Version Description
- Google Universal Analytics plugin now supports Lithuanian and Spanish languages!
- Due to compatibility issues WooCommerce tracking has been removed.
Download this release
Release Info
Developer | audriusd |
Plugin | Google Universal Analytics |
Version | 2.3.2 |
Comparing to | |
See all releases |
Code changes from version 2.3.1 to 2.3.2
- classic/classic-analytics.php +14 -14
- classic/custom-analytics.php +13 -13
- googleanalytics.php +17 -84
- langs/gua-es_ES.mo +0 -0
- langs/gua-es_ES.pot +127 -0
- langs/gua-lt_LT.mo +0 -0
- langs/gua-lt_LT.pot +130 -0
- options.php +27 -32
- readme.txt +14 -3
- woo_code.php +0 -44
classic/classic-analytics.php
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
<div class="wrap">
|
2 |
-
<h2
|
3 |
<br />
|
4 |
-
<em
|
5 |
<br />
|
6 |
<div class="col-lg-6 row">
|
7 |
<form class="form-horizontal" method="post" action="options.php" role="form" id="classic-google-universal-options">
|
8 |
<?php settings_fields('google-universal-settings-classic'); ?>
|
9 |
<div class="form-group">
|
10 |
-
<label for="web_property_id" class="col-sm-
|
11 |
-
<div class="col-sm-
|
12 |
<input id="classic_plugin_switch" type="checkbox" name="classic_plugin_switch" <?php if(get_option('classic_plugin_switch')=='on'): ?> checked="checked" <?php endif; ?>>
|
13 |
</div>
|
14 |
</div>
|
15 |
<div class="form-group">
|
16 |
-
<label for="classic_web_property_id" class="col-sm-
|
17 |
-
<div class="col-sm-
|
18 |
<input type="text" class="form-control" name="classic_web_property_id" id="classic_web_property_id" placeholder="Tracking code example: UA-23710779-7" value="<?php echo get_option('classic_property_id'); ?>">
|
19 |
-
<span class="error hide"><strong
|
20 |
</div>
|
21 |
<div class="form-group">
|
22 |
-
<div class="col-sm-offset-
|
23 |
<div class="checkbox">
|
24 |
<label>
|
25 |
<input type="checkbox" name="classic_in_footer" id="classic_in_footer" <?php if(get_option('classic_in_footer')=='on'): ?> checked="checked" <?php endif; ?>>
|
26 |
-
Place code in footer </label>
|
27 |
</div>
|
28 |
</div>
|
29 |
</div>
|
30 |
<div class="form-group">
|
31 |
-
<div class="col-sm-offset-
|
32 |
<?php global $wp_roles;
|
33 |
|
34 |
$roles = $wp_roles->get_names(); ?>
|
35 |
<div class="checkbox">
|
36 |
<label>
|
37 |
<input type="checkbox" name="classic_tracking_off_for_role" id="classic_tracking_off_for_role" <?php if(get_option('classic_tracking_off_for_role')=='on'): ?> checked="checked" <?php endif; ?>>
|
38 |
-
Disable Tracking For
|
39 |
<select id="classic_tracking_off_for_this_role">
|
40 |
<?php foreach($roles as $role) { ?>
|
41 |
<option value="<?php echo $role;?>" <?php if(get_option('classic_tracking_off_for_this_role')== $role){echo 'selected="selected"';} ?>><?php echo $role;?></option>
|
@@ -46,15 +46,15 @@
|
|
46 |
</div>
|
47 |
</div>
|
48 |
<div class="form-group">
|
49 |
-
<div class="col-sm-offset-
|
50 |
<input type="hidden" id="ajax_url" name="ajax_url" value="<?php echo admin_url('admin-ajax.php'); ?>" />
|
51 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
|
52 |
<!--<button type="button" class="button button-primary" id="save-classic-settings">Save Changes</button>-->
|
53 |
-
|
54 |
</div>
|
55 |
</form>
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
58 |
-
<div class="row col-lg-6"
|
59 |
</div>
|
60 |
</br>
|
1 |
<div class="wrap">
|
2 |
+
<h2><?php echo __('Google Classic Analytics', 'gua'); ?><em> <?php echo __('(ga.js)', 'gua'); ?></em></h2>
|
3 |
<br />
|
4 |
+
<em><?php echo __('This is an older version of Google Analytics. Use this version only if you have not upgraded to Universal Analytics yet or want to use both trackers (which is totally fine!).', 'gua'); ?></em> <br />
|
5 |
<br />
|
6 |
<div class="col-lg-6 row">
|
7 |
<form class="form-horizontal" method="post" action="options.php" role="form" id="classic-google-universal-options">
|
8 |
<?php settings_fields('google-universal-settings-classic'); ?>
|
9 |
<div class="form-group">
|
10 |
+
<label for="web_property_id" class="col-sm-4 control-label"><?php echo __('Status', 'gua'); ?></label>
|
11 |
+
<div class="col-sm-8">
|
12 |
<input id="classic_plugin_switch" type="checkbox" name="classic_plugin_switch" <?php if(get_option('classic_plugin_switch')=='on'): ?> checked="checked" <?php endif; ?>>
|
13 |
</div>
|
14 |
</div>
|
15 |
<div class="form-group">
|
16 |
+
<label for="classic_web_property_id" class="col-sm-4 control-label"><?php echo __('Tracking ID', 'gua'); ?></label>
|
17 |
+
<div class="col-sm-8">
|
18 |
<input type="text" class="form-control" name="classic_web_property_id" id="classic_web_property_id" placeholder="Tracking code example: UA-23710779-7" value="<?php echo get_option('classic_property_id'); ?>">
|
19 |
+
<span class="error hide"><strong><?php echo __('Error!', 'gua'); ?> </strong> <?php echo __('match your code with this forma: UA-41335660-1', 'gua'); ?></span> </div>
|
20 |
</div>
|
21 |
<div class="form-group">
|
22 |
+
<div class="col-sm-offset-4 col-sm-8">
|
23 |
<div class="checkbox">
|
24 |
<label>
|
25 |
<input type="checkbox" name="classic_in_footer" id="classic_in_footer" <?php if(get_option('classic_in_footer')=='on'): ?> checked="checked" <?php endif; ?>>
|
26 |
+
<?php echo __('Place code in footer', 'gua'); ?> </label>
|
27 |
</div>
|
28 |
</div>
|
29 |
</div>
|
30 |
<div class="form-group">
|
31 |
+
<div class="col-sm-offset-4 col-sm-8">
|
32 |
<?php global $wp_roles;
|
33 |
|
34 |
$roles = $wp_roles->get_names(); ?>
|
35 |
<div class="checkbox">
|
36 |
<label>
|
37 |
<input type="checkbox" name="classic_tracking_off_for_role" id="classic_tracking_off_for_role" <?php if(get_option('classic_tracking_off_for_role')=='on'): ?> checked="checked" <?php endif; ?>>
|
38 |
+
<?php echo __('Disable Tracking For', 'gua'); ?>
|
39 |
<select id="classic_tracking_off_for_this_role">
|
40 |
<?php foreach($roles as $role) { ?>
|
41 |
<option value="<?php echo $role;?>" <?php if(get_option('classic_tracking_off_for_this_role')== $role){echo 'selected="selected"';} ?>><?php echo $role;?></option>
|
46 |
</div>
|
47 |
</div>
|
48 |
<div class="form-group">
|
49 |
+
<div class="col-sm-offset-4 col-sm-8">
|
50 |
<input type="hidden" id="ajax_url" name="ajax_url" value="<?php echo admin_url('admin-ajax.php'); ?>" />
|
51 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
|
52 |
<!--<button type="button" class="button button-primary" id="save-classic-settings">Save Changes</button>-->
|
53 |
+
</div>
|
54 |
</div>
|
55 |
</form>
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
58 |
+
<div class="row col-lg-6"><?php echo __('Have a question? Drop us a question at', 'gua'); ?> <a href="http://onlineads.lt/?utm_source=WordPress&utm_medium=Google%20Universal%20Analytics%202.3.2&utm_content=Google%20Classic%20Analytics&utm_campaign=WordPress%20plugins" title="Google Universal Analytics">OnlineAds.lt</a> </div>
|
59 |
</div>
|
60 |
</br>
|
classic/custom-analytics.php
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
<div class="wrap">
|
2 |
-
<h2
|
3 |
<br />
|
4 |
-
<em
|
5 |
<br />
|
6 |
<div class="col-lg-6 row">
|
7 |
<form class="form-horizontal" method="post" action="options.php" role="form" id="google-universal-options">
|
8 |
<?php settings_fields('google-universal-settings-custom'); ?>
|
9 |
<div class="form-group">
|
10 |
-
<label for="web_property_id" class="col-sm-
|
11 |
-
<div class="col-sm-
|
12 |
<input id="custom_plugin_switch" type="checkbox" name="custom_plugin_switch" <?php if(get_option('custom_plugin_switch')=='on'): ?> checked="checked" <?php endif; ?>>
|
13 |
</div>
|
14 |
</div>
|
15 |
<div class="form-group">
|
16 |
-
<label for="web_property_id" class="col-sm-
|
17 |
-
<div class="col-sm-
|
18 |
<textarea class="form-control" name="custom_web_property_id" id="custom_web_property_id" rows="6" placeholder="Past your custom google tracking code here"><?php echo get_option('custom_web_property_id'); ?></textarea>
|
19 |
</div>
|
20 |
</div>
|
21 |
<div class="form-group">
|
22 |
-
<div class="col-sm-offset-
|
23 |
<div class="checkbox">
|
24 |
<label>
|
25 |
<input type="checkbox" name="custom_in_footer" id="custom_in_footer" <?php if(get_option('custom_in_footer')=='on'): ?> checked="checked" <?php endif; ?>>
|
26 |
-
Place code in footer </label>
|
27 |
</div>
|
28 |
</div>
|
29 |
</div>
|
30 |
<div class="form-group">
|
31 |
-
<div class="col-sm-offset-
|
32 |
<?php global $wp_roles;
|
33 |
|
34 |
$roles = $wp_roles->get_names(); ?>
|
35 |
<div class="checkbox">
|
36 |
<label>
|
37 |
<input type="checkbox" name="custom_tracking_off_for_role" id="custom_tracking_off_for_role" <?php if(get_option('custom_tracking_off_for_role')=='on'): ?> checked="checked" <?php endif; ?>>
|
38 |
-
Disable Tracking For
|
39 |
<select id="custom_tracking_off_for_this_role">
|
40 |
<?php foreach($roles as $role) { ?>
|
41 |
<option value="<?php echo $role;?>" <?php if(get_option('custom_tracking_off_for_this_role')== $role){echo 'selected="selected"';} ?>><?php echo $role;?></option>
|
@@ -46,15 +46,15 @@
|
|
46 |
</div>
|
47 |
</div>
|
48 |
<div class="form-group">
|
49 |
-
<div class="col-sm-offset-
|
50 |
<input type="hidden" id="ajax_url" name="ajax_url" value="<?php echo admin_url('admin-ajax.php'); ?>" />
|
51 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
|
52 |
<!--<button type="button" class="button button-primary" id="save-custom-settings">Save Changes</button>-->
|
53 |
-
|
54 |
</div>
|
55 |
</form>
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
58 |
-
<div class="row col-lg-6"
|
59 |
</div>
|
60 |
</br>
|
1 |
<div class="wrap">
|
2 |
+
<h2><?php echo __('Custom Google Analytics', 'gua'); ?></h2>
|
3 |
<br />
|
4 |
+
<em><?php echo __('This is a place to customize your tracking code.', 'gua'); ?> </em> <br />
|
5 |
<br />
|
6 |
<div class="col-lg-6 row">
|
7 |
<form class="form-horizontal" method="post" action="options.php" role="form" id="google-universal-options">
|
8 |
<?php settings_fields('google-universal-settings-custom'); ?>
|
9 |
<div class="form-group">
|
10 |
+
<label for="web_property_id" class="col-sm-4 control-label"><?php echo __('Status', 'gua'); ?></label>
|
11 |
+
<div class="col-sm-8">
|
12 |
<input id="custom_plugin_switch" type="checkbox" name="custom_plugin_switch" <?php if(get_option('custom_plugin_switch')=='on'): ?> checked="checked" <?php endif; ?>>
|
13 |
</div>
|
14 |
</div>
|
15 |
<div class="form-group">
|
16 |
+
<label for="web_property_id" class="col-sm-4 control-label"><?php echo __('Tracking Code', 'gua'); ?></label>
|
17 |
+
<div class="col-sm-8">
|
18 |
<textarea class="form-control" name="custom_web_property_id" id="custom_web_property_id" rows="6" placeholder="Past your custom google tracking code here"><?php echo get_option('custom_web_property_id'); ?></textarea>
|
19 |
</div>
|
20 |
</div>
|
21 |
<div class="form-group">
|
22 |
+
<div class="col-sm-offset-4 col-sm-8">
|
23 |
<div class="checkbox">
|
24 |
<label>
|
25 |
<input type="checkbox" name="custom_in_footer" id="custom_in_footer" <?php if(get_option('custom_in_footer')=='on'): ?> checked="checked" <?php endif; ?>>
|
26 |
+
<?php echo __('Place code in footer', 'gua'); ?> </label>
|
27 |
</div>
|
28 |
</div>
|
29 |
</div>
|
30 |
<div class="form-group">
|
31 |
+
<div class="col-sm-offset-4 col-sm-8">
|
32 |
<?php global $wp_roles;
|
33 |
|
34 |
$roles = $wp_roles->get_names(); ?>
|
35 |
<div class="checkbox">
|
36 |
<label>
|
37 |
<input type="checkbox" name="custom_tracking_off_for_role" id="custom_tracking_off_for_role" <?php if(get_option('custom_tracking_off_for_role')=='on'): ?> checked="checked" <?php endif; ?>>
|
38 |
+
<?php echo __('Disable Tracking For', 'gua'); ?>
|
39 |
<select id="custom_tracking_off_for_this_role">
|
40 |
<?php foreach($roles as $role) { ?>
|
41 |
<option value="<?php echo $role;?>" <?php if(get_option('custom_tracking_off_for_this_role')== $role){echo 'selected="selected"';} ?>><?php echo $role;?></option>
|
46 |
</div>
|
47 |
</div>
|
48 |
<div class="form-group">
|
49 |
+
<div class="col-sm-offset-4 col-sm-8">
|
50 |
<input type="hidden" id="ajax_url" name="ajax_url" value="<?php echo admin_url('admin-ajax.php'); ?>" />
|
51 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
|
52 |
<!--<button type="button" class="button button-primary" id="save-custom-settings">Save Changes</button>-->
|
53 |
+
</div>
|
54 |
</div>
|
55 |
</form>
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
58 |
+
<div class="row col-lg-6"><?php echo __('Have a question? Drop us a question at', 'gua'); ?> <a href="http://onlineads.lt/?utm_source=WordPress&utm_medium=Google%20Universal%20Analytics%202.3.2&utm_content=Google%20Custom%20Analytics&utm_campaign=WordPress%20plugins">OnlineAds.lt</a> </div>
|
59 |
</div>
|
60 |
</br>
|
googleanalytics.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Plugin Name: Google Universal Analytics
|
6 |
Plugin URI: http://wordpress.org/extend/plugins/google-universal-analytics/
|
7 |
Description: Adds <a href="http://www.google.com/analytics/">Google Analytics</a> tracking code on all pages.
|
8 |
-
Version: 2.3.
|
9 |
Author: Audrius Dobilinskas
|
10 |
Author URI: http://onlineads.lt/
|
11 |
|
@@ -27,6 +27,15 @@ if (!defined('WP_PLUGIN_DIR'))
|
|
27 |
|
28 |
define('WP_PLUGIN_DIR', WP_CONTENT_DIR.'/plugins');
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
register_deactivation_hook(__FILE__, 'deactive_google_universal_analytics');
|
32 |
register_activation_hook( __FILE__, 'activate_google_universal_analytics' );
|
@@ -41,7 +50,6 @@ function register_plugin_settings(){
|
|
41 |
register_setting('google-universal-settings','track_links');
|
42 |
register_setting('google-universal-settings','enable_display');
|
43 |
register_setting('google-universal-settings','anonymize_ip');
|
44 |
-
register_setting('google-universal-settings','woo_tracking');
|
45 |
register_setting('google-universal-settings','set_domain');
|
46 |
register_setting('google-universal-settings','set_domain_domain');
|
47 |
register_setting('google-universal-settings','tracking_off_for_this_role');
|
@@ -70,10 +78,7 @@ function activate_google_universal_analytics(){
|
|
70 |
|
71 |
|
72 |
|
73 |
-
|
74 |
-
if(!file_exists($woo_code_path)){
|
75 |
-
copy(plugin_dir_path( __FILE__ ).'woo_code.php', $woo_code_path);
|
76 |
-
}
|
77 |
}
|
78 |
function deactive_google_universal_analytics() {
|
79 |
delete_option('web_property_id');
|
@@ -82,7 +87,6 @@ function deactive_google_universal_analytics() {
|
|
82 |
delete_option('track_links');
|
83 |
delete_option('enable_display');
|
84 |
delete_option('anonymize_ip');
|
85 |
-
delete_option('woo_tracking');
|
86 |
delete_option('set_domain');
|
87 |
delete_option('set_domain_domain');
|
88 |
delete_option('tracking_off_for_this_role');
|
@@ -105,16 +109,7 @@ function deactive_google_universal_analytics() {
|
|
105 |
delete_option('custom_tracking_off_for_role');
|
106 |
delete_option('custom_tracking_off_for_this_role');
|
107 |
|
108 |
-
|
109 |
-
$woo_code_path = get_template_directory().'/woo_code.php';
|
110 |
-
if(file_exists($woo_code_path)){
|
111 |
-
unlink($woo_code_path);
|
112 |
-
}
|
113 |
-
$var1 = 'require "woo_code.php";';
|
114 |
-
$get_func_file_path = get_template_directory().'/functions.php';
|
115 |
-
$contents = file_get_contents($get_func_file_path);
|
116 |
-
$contents = str_replace($var1, '', $contents);
|
117 |
-
file_put_contents($get_func_file_path, $contents);
|
118 |
}
|
119 |
|
120 |
|
@@ -127,17 +122,17 @@ function admin_menu_google_universal_analytics() {
|
|
127 |
|
128 |
|
129 |
|
130 |
-
$settings_page = add_menu_page( 'Google Universal Analytics', 'Google Universal Analytics', 'manage_options', 'google_universal_analytics', 'options_page_google_universal_analytics' );
|
131 |
|
132 |
add_submenu_page('google_universal_analytics','','','manage_options','google_universal_analytics','options_page_google_universal_analytics');
|
133 |
|
134 |
-
$settings_page1 = add_submenu_page( 'google_universal_analytics', 'Universal Analytics', 'Universal Analytics', 'manage_options', 'google_universal_analytics', 'options_page_google_universal_analytics' );
|
135 |
|
136 |
-
$classic_page = add_submenu_page( 'google_universal_analytics', 'Classic Analytics', 'Classic Analytics', 'manage_options', 'classic_analytics', 'classic_analytics_page_google_universal_analytics' );
|
137 |
|
138 |
|
139 |
|
140 |
-
$cutom_page = add_submenu_page( 'google_universal_analytics', 'Custom Tracker', 'Custom Tracker', 'manage_options', 'custom_analytics', 'custom_analytics_page_google_universal_analytics' );
|
141 |
|
142 |
|
143 |
|
@@ -448,66 +443,4 @@ function display_google_universal_analytics_code(){
|
|
448 |
}
|
449 |
|
450 |
}
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
}
|
455 |
-
//adding woo tracking
|
456 |
-
|
457 |
-
//$var1 = 'require "woo_code.php";';
|
458 |
-
|
459 |
-
$var1 = 'function ia_wc_ga_integration( $order_id ) {
|
460 |
-
$order = new WC_Order( $order_id ); ?>
|
461 |
-
|
462 |
-
<script type="text/javascript">
|
463 |
-
ga("require", "ecommerce", "ecommerce.js"); // Load The Ecommerce Tracking Plugin
|
464 |
-
|
465 |
-
// Transaction Details
|
466 |
-
ga("ecommerce:addTransaction", {
|
467 |
-
"id": "<?php echo $order_id;?>",
|
468 |
-
"affiliation": "<?php echo get_option( "blogname" );?>",
|
469 |
-
"revenue": "<?php echo $order->get_total();?>",
|
470 |
-
"shipping": "<?php echo $order->get_total_shipping();?>",
|
471 |
-
"tax": "<?php echo $order->get_total_tax();?>",
|
472 |
-
"currency": "<?php echo get_woocommerce_currency();?>"
|
473 |
-
});
|
474 |
-
|
475 |
-
|
476 |
-
<?php
|
477 |
-
//Item Details
|
478 |
-
if ( sizeof( $order->get_items() ) > 0 ) {
|
479 |
-
foreach( $order->get_items() as $item ) {
|
480 |
-
$product_cats = get_the_terms( $item["product_id"], "product_cat" );
|
481 |
-
if ($product_cats) {
|
482 |
-
$cat = $product_cats[0];
|
483 |
-
} ?>
|
484 |
-
ga("ecommerce:addItem", {
|
485 |
-
"id": "<?php echo $order_id;?>",
|
486 |
-
"name": "<?php echo $item["name"];?>",
|
487 |
-
"sku": "<?php echo get_post_meta($item["product_id"], "_sku", true);?>",
|
488 |
-
"category": "<?php echo $cat->name;?>",
|
489 |
-
"price": "<?php echo $item["line_subtotal"];?>",
|
490 |
-
"quantity": "<?php echo $item["qty"];?>",
|
491 |
-
"currency": "<?php echo get_woocommerce_currency();?>"
|
492 |
-
});
|
493 |
-
<?php
|
494 |
-
}
|
495 |
-
} ?>
|
496 |
-
ga("ecommerce:send");
|
497 |
-
</script>
|
498 |
-
<?php }
|
499 |
-
add_action( "woocommerce_thankyou", "ia_wc_ga_integration" );';
|
500 |
-
|
501 |
-
$get_func_file_path = get_template_directory().'/functions.php';
|
502 |
-
if(get_option('woo_tracking')=='on'){
|
503 |
-
if(strpos(file_get_contents($get_func_file_path),$var1) !== false){
|
504 |
-
}else{
|
505 |
-
$data = sprintf("%s\n", $var1);
|
506 |
-
file_put_contents($get_func_file_path, $data, FILE_APPEND);
|
507 |
-
}
|
508 |
-
}elseif(get_option('woo_tracking')=='off'){
|
509 |
-
$contents = file_get_contents($get_func_file_path);
|
510 |
-
$contents = str_replace($var1, '', $contents);
|
511 |
-
file_put_contents($get_func_file_path, $contents);
|
512 |
-
}
|
513 |
-
|
5 |
Plugin Name: Google Universal Analytics
|
6 |
Plugin URI: http://wordpress.org/extend/plugins/google-universal-analytics/
|
7 |
Description: Adds <a href="http://www.google.com/analytics/">Google Analytics</a> tracking code on all pages.
|
8 |
+
Version: 2.3.2
|
9 |
Author: Audrius Dobilinskas
|
10 |
Author URI: http://onlineads.lt/
|
11 |
|
27 |
|
28 |
define('WP_PLUGIN_DIR', WP_CONTENT_DIR.'/plugins');
|
29 |
|
30 |
+
add_action( 'plugins_loaded', 'myplugin_load_textdomain' );
|
31 |
+
/**
|
32 |
+
* Load plugin textdomain.
|
33 |
+
*
|
34 |
+
* @since 1.0.0
|
35 |
+
*/
|
36 |
+
function myplugin_load_textdomain() {
|
37 |
+
load_plugin_textdomain( 'gua', false, dirname( plugin_basename( __FILE__ ) ) . '/langs' );
|
38 |
+
}
|
39 |
|
40 |
register_deactivation_hook(__FILE__, 'deactive_google_universal_analytics');
|
41 |
register_activation_hook( __FILE__, 'activate_google_universal_analytics' );
|
50 |
register_setting('google-universal-settings','track_links');
|
51 |
register_setting('google-universal-settings','enable_display');
|
52 |
register_setting('google-universal-settings','anonymize_ip');
|
|
|
53 |
register_setting('google-universal-settings','set_domain');
|
54 |
register_setting('google-universal-settings','set_domain_domain');
|
55 |
register_setting('google-universal-settings','tracking_off_for_this_role');
|
78 |
|
79 |
|
80 |
|
81 |
+
|
|
|
|
|
|
|
82 |
}
|
83 |
function deactive_google_universal_analytics() {
|
84 |
delete_option('web_property_id');
|
87 |
delete_option('track_links');
|
88 |
delete_option('enable_display');
|
89 |
delete_option('anonymize_ip');
|
|
|
90 |
delete_option('set_domain');
|
91 |
delete_option('set_domain_domain');
|
92 |
delete_option('tracking_off_for_this_role');
|
109 |
delete_option('custom_tracking_off_for_role');
|
110 |
delete_option('custom_tracking_off_for_this_role');
|
111 |
|
112 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
114 |
|
115 |
|
122 |
|
123 |
|
124 |
|
125 |
+
$settings_page = add_menu_page( __('Google Universal Analytics', 'gua'), __('Google Universal Analytics', 'gua'), 'manage_options', 'google_universal_analytics', 'options_page_google_universal_analytics' );
|
126 |
|
127 |
add_submenu_page('google_universal_analytics','','','manage_options','google_universal_analytics','options_page_google_universal_analytics');
|
128 |
|
129 |
+
$settings_page1 = add_submenu_page( 'google_universal_analytics', __('Universal Analytics', 'gua'), __('Universal Analytics', 'gua'), 'manage_options', 'google_universal_analytics', 'options_page_google_universal_analytics' );
|
130 |
|
131 |
+
$classic_page = add_submenu_page( 'google_universal_analytics', __('Classic Analytics', 'gua'), __('Classic Analytics', 'gua'), 'manage_options', 'classic_analytics', 'classic_analytics_page_google_universal_analytics' );
|
132 |
|
133 |
|
134 |
|
135 |
+
$cutom_page = add_submenu_page( 'google_universal_analytics', __('Custom Tracker', 'gua'), __('Custom Tracker', 'gua'), 'manage_options', 'custom_analytics', 'custom_analytics_page_google_universal_analytics' );
|
136 |
|
137 |
|
138 |
|
443 |
}
|
444 |
|
445 |
}
|
446 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
langs/gua-es_ES.mo
ADDED
Binary file
|
langs/gua-es_ES.pot
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: gua\n"
|
4 |
+
"POT-Creation-Date: 2014-05-27 21:10+0500\n"
|
5 |
+
"PO-Revision-Date: 2014-05-27 21:10+0500\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: es_ES\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.5\n"
|
13 |
+
"X-Poedit-Basepath: ../\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
+
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
|
18 |
+
#: classic/classic-analytics.php:2
|
19 |
+
msgid "Google Classic Analytics"
|
20 |
+
msgstr "Google Classic Analytics"
|
21 |
+
|
22 |
+
#: classic/classic-analytics.php:2
|
23 |
+
msgid "(ga.js)"
|
24 |
+
msgstr "(ga.js)"
|
25 |
+
|
26 |
+
#: classic/classic-analytics.php:4
|
27 |
+
msgid ""
|
28 |
+
"This is an older version of Google Analytics. Use this version only if you "
|
29 |
+
"have not upgraded to Universal Analytics yet or want to use both trackers "
|
30 |
+
"(which is totally fine!)."
|
31 |
+
msgstr ""
|
32 |
+
"Esta opción es la más adecuada si actualmente utiliza un código de "
|
33 |
+
"seguimiento de la versión clásica de Google Analytics."
|
34 |
+
|
35 |
+
#: classic/classic-analytics.php:10 classic/custom-analytics.php:10
|
36 |
+
#: options.php:8
|
37 |
+
msgid "Status"
|
38 |
+
msgstr "Estado"
|
39 |
+
|
40 |
+
#: classic/classic-analytics.php:16 options.php:14
|
41 |
+
msgid "Tracking ID"
|
42 |
+
msgstr "ID de propiedad"
|
43 |
+
|
44 |
+
#: classic/classic-analytics.php:19 options.php:17
|
45 |
+
msgid "Error!"
|
46 |
+
msgstr "Error!"
|
47 |
+
|
48 |
+
#: classic/classic-analytics.php:19
|
49 |
+
msgid "match your code with this forma: UA-41335660-1"
|
50 |
+
msgstr "Número de cuenta en el formato: UA-41335660-1"
|
51 |
+
|
52 |
+
#: classic/classic-analytics.php:26 classic/custom-analytics.php:26
|
53 |
+
#: options.php:28
|
54 |
+
msgid "Place code in footer"
|
55 |
+
msgstr "Mover código para 'footer'"
|
56 |
+
|
57 |
+
#: classic/classic-analytics.php:38 classic/custom-analytics.php:38
|
58 |
+
#: options.php:76
|
59 |
+
msgid "Disable Tracking For"
|
60 |
+
msgstr "Inhabilitar Acceder para"
|
61 |
+
|
62 |
+
#: classic/classic-analytics.php:51 classic/custom-analytics.php:51
|
63 |
+
#: options.php:88
|
64 |
+
msgid "Save Changes"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: classic/classic-analytics.php:58 classic/custom-analytics.php:58
|
68 |
+
#: options.php:95
|
69 |
+
msgid "Have a question? Drop us a question at"
|
70 |
+
msgstr "Si tiene alguna pregunta, póngase en contacto"
|
71 |
+
|
72 |
+
#: classic/custom-analytics.php:2
|
73 |
+
msgid "Custom Google Analytics"
|
74 |
+
msgstr "Personalizadas en Google Analytics"
|
75 |
+
|
76 |
+
#: classic/custom-analytics.php:4
|
77 |
+
msgid "This is a place to customize your tracking code."
|
78 |
+
msgstr ""
|
79 |
+
"Puede personalizar para recopilar los datos de los que Google Analytics no "
|
80 |
+
"realiza un seguimiento automáticamente."
|
81 |
+
|
82 |
+
#: classic/custom-analytics.php:16
|
83 |
+
msgid "Tracking Code"
|
84 |
+
msgstr "ID de propiedad"
|
85 |
+
|
86 |
+
#: googleanalytics.php:125 options.php:2
|
87 |
+
msgid "Google Universal Analytics"
|
88 |
+
msgstr "Google Universal Analytics"
|
89 |
+
|
90 |
+
#: googleanalytics.php:129
|
91 |
+
msgid "Universal Analytics"
|
92 |
+
msgstr "Universal Analytics"
|
93 |
+
|
94 |
+
#: googleanalytics.php:131
|
95 |
+
msgid "Classic Analytics"
|
96 |
+
msgstr "Classic Analytics"
|
97 |
+
|
98 |
+
#: googleanalytics.php:135
|
99 |
+
msgid "Custom Tracker"
|
100 |
+
msgstr "El código personalizado"
|
101 |
+
|
102 |
+
#: options.php:17
|
103 |
+
msgid "match your code with this format: UA-41115660-1"
|
104 |
+
msgstr "Número de cuenta en el formato: UA-41335660-1"
|
105 |
+
|
106 |
+
#: options.php:21
|
107 |
+
msgid "Advanced settings:"
|
108 |
+
msgstr "Configuración avanzada"
|
109 |
+
|
110 |
+
#: options.php:37
|
111 |
+
msgid "Track events (Downloads, Mailto & Outbound URLs)"
|
112 |
+
msgstr "Funciones de la publicidad de display (Listas de remarketing)"
|
113 |
+
|
114 |
+
#: options.php:46
|
115 |
+
msgid "Enable Display Advertising"
|
116 |
+
msgstr "Funciones de la publicidad de display (Listas de remarketing)"
|
117 |
+
|
118 |
+
#: options.php:55
|
119 |
+
msgid "Anonymize IP"
|
120 |
+
msgstr "Anonimización de IP"
|
121 |
+
|
122 |
+
#: options.php:64
|
123 |
+
msgid "Set Domain"
|
124 |
+
msgstr "Establecer dominio"
|
125 |
+
|
126 |
+
#~ msgid "Enable Woocommerce e-commerce tracking"
|
127 |
+
#~ msgstr "WooCommerce seguimiento de comercio electrónico"
|
langs/gua-lt_LT.mo
ADDED
Binary file
|
langs/gua-lt_LT.pot
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: gua\n"
|
4 |
+
"POT-Creation-Date: 2014-05-27 21:09+0500\n"
|
5 |
+
"PO-Revision-Date: 2014-05-27 21:10+0500\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: lt_LT\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.5\n"
|
13 |
+
"X-Poedit-Basepath: ../\n"
|
14 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
|
15 |
+
"%100<10 || n%100>=20) ? 1 : 2);\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: classic/classic-analytics.php:2
|
20 |
+
msgid "Google Classic Analytics"
|
21 |
+
msgstr "Google Classic Analytics"
|
22 |
+
|
23 |
+
#: classic/classic-analytics.php:2
|
24 |
+
msgid "(ga.js)"
|
25 |
+
msgstr "(ga.js)"
|
26 |
+
|
27 |
+
#: classic/classic-analytics.php:4
|
28 |
+
msgid ""
|
29 |
+
"This is an older version of Google Analytics. Use this version only if you "
|
30 |
+
"have not upgraded to Universal Analytics yet or want to use both trackers "
|
31 |
+
"(which is totally fine!)."
|
32 |
+
msgstr ""
|
33 |
+
"Tai senesnė Google Analytics versija. Naudokitės šia versija tik tuo atveju "
|
34 |
+
"jei dar neatnaujinote savo Google Analytics paskyros į Universal Analytics "
|
35 |
+
"arba norite naudotis abiem versijomis."
|
36 |
+
|
37 |
+
#: classic/classic-analytics.php:10 classic/custom-analytics.php:10
|
38 |
+
#: options.php:8
|
39 |
+
msgid "Status"
|
40 |
+
msgstr "Statusas"
|
41 |
+
|
42 |
+
#: classic/classic-analytics.php:16 options.php:14
|
43 |
+
msgid "Tracking ID"
|
44 |
+
msgstr "Stebejimo kodas"
|
45 |
+
|
46 |
+
#: classic/classic-analytics.php:19 options.php:17
|
47 |
+
msgid "Error!"
|
48 |
+
msgstr "Klaida!"
|
49 |
+
|
50 |
+
#: classic/classic-analytics.php:19
|
51 |
+
msgid "match your code with this forma: UA-41335660-1"
|
52 |
+
msgstr "Stebėjimo kodo formatas: UA-41335660-1"
|
53 |
+
|
54 |
+
#: classic/classic-analytics.php:26 classic/custom-analytics.php:26
|
55 |
+
#: options.php:28
|
56 |
+
msgid "Place code in footer"
|
57 |
+
msgstr "Perkelti kodą i footer'į"
|
58 |
+
|
59 |
+
#: classic/classic-analytics.php:38 classic/custom-analytics.php:38
|
60 |
+
#: options.php:76
|
61 |
+
msgid "Disable Tracking For"
|
62 |
+
msgstr "Išjungti stebėjimą"
|
63 |
+
|
64 |
+
#: classic/classic-analytics.php:51 classic/custom-analytics.php:51
|
65 |
+
#: options.php:88
|
66 |
+
msgid "Save Changes"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: classic/classic-analytics.php:58 classic/custom-analytics.php:58
|
70 |
+
#: options.php:95
|
71 |
+
msgid "Have a question? Drop us a question at"
|
72 |
+
msgstr "Turite klausimų? Rašykite"
|
73 |
+
|
74 |
+
#: classic/custom-analytics.php:2
|
75 |
+
msgid "Custom Google Analytics"
|
76 |
+
msgstr "Individualus Google Analytics"
|
77 |
+
|
78 |
+
#: classic/custom-analytics.php:4
|
79 |
+
msgid "This is a place to customize your tracking code."
|
80 |
+
msgstr ""
|
81 |
+
"Čia galite keisti savo stebėjimo kodą. Naudinga tiems kas nori pridėti "
|
82 |
+
"papildomas funkcijas, kurių ši WordPress aplikacija dar neturi."
|
83 |
+
|
84 |
+
#: classic/custom-analytics.php:16
|
85 |
+
msgid "Tracking Code"
|
86 |
+
msgstr "Stebėjimo kodas"
|
87 |
+
|
88 |
+
#: googleanalytics.php:125 options.php:2
|
89 |
+
msgid "Google Universal Analytics"
|
90 |
+
msgstr "Google Universal Analytics"
|
91 |
+
|
92 |
+
#: googleanalytics.php:129
|
93 |
+
msgid "Universal Analytics"
|
94 |
+
msgstr "Universal Analytics"
|
95 |
+
|
96 |
+
#: googleanalytics.php:131
|
97 |
+
msgid "Classic Analytics"
|
98 |
+
msgstr "Classic Analytics"
|
99 |
+
|
100 |
+
#: googleanalytics.php:135
|
101 |
+
msgid "Custom Tracker"
|
102 |
+
msgstr "Individualus kodas"
|
103 |
+
|
104 |
+
#: options.php:17
|
105 |
+
msgid "match your code with this format: UA-41115660-1"
|
106 |
+
msgstr "Stebėjimo kodo formatas: UA-41335660-1"
|
107 |
+
|
108 |
+
#: options.php:21
|
109 |
+
msgid "Advanced settings:"
|
110 |
+
msgstr "Papildomi nustatymai"
|
111 |
+
|
112 |
+
#: options.php:37
|
113 |
+
msgid "Track events (Downloads, Mailto & Outbound URLs)"
|
114 |
+
msgstr ""
|
115 |
+
"Sekti virtualius įvykius (parisiuntimus, mailto & išeinančias nuorodas)"
|
116 |
+
|
117 |
+
#: options.php:46
|
118 |
+
msgid "Enable Display Advertising"
|
119 |
+
msgstr "Video reklamos funkcija (pakartotinė rinkodara)"
|
120 |
+
|
121 |
+
#: options.php:55
|
122 |
+
msgid "Anonymize IP"
|
123 |
+
msgstr "Anonimizuoti IP"
|
124 |
+
|
125 |
+
#: options.php:64
|
126 |
+
msgid "Set Domain"
|
127 |
+
msgstr "Nustatyti domeną"
|
128 |
+
|
129 |
+
#~ msgid "Enable Woocommerce e-commerce tracking"
|
130 |
+
#~ msgstr "Įjungti Woocommerce e-komercijos stebėjimą"
|
options.php
CHANGED
@@ -1,88 +1,79 @@
|
|
1 |
<div class="wrap">
|
2 |
-
<h2
|
3 |
<br />
|
4 |
<div class="col-lg-6 row">
|
5 |
<form class="form-horizontal" method="post" action="options.php" role="form" id="google-universal-options">
|
6 |
<?php settings_fields('google-universal-settings'); ?>
|
7 |
<div class="form-group">
|
8 |
-
<label for="web_property_id" class="col-sm-
|
9 |
-
<div class="col-sm-
|
10 |
<input id="plugin_switch" type="checkbox" name="plugin_switch" <?php if(get_option('plugin_switch')=='on'): ?> checked="checked" <?php endif; ?>>
|
11 |
</div>
|
12 |
</div>
|
13 |
<div class="form-group">
|
14 |
-
<label for="web_property_id" class="col-sm-
|
15 |
-
<div class="col-sm-
|
16 |
<input type="text" class="form-control" name="web_property_id" id="web_property_id" placeholder="Tracking code example: UA-23710711-7" value="<?php echo get_option('web_property_id'); ?>">
|
17 |
-
<span class="error hide" id="code-error"><strong
|
18 |
</div>
|
19 |
<div class="form-group">
|
20 |
-
<label for="web_property_id" class="col-sm-
|
21 |
-
<div class="col-sm-
|
22 |
</div>
|
23 |
<div class="form-group">
|
24 |
-
<div class="col-sm-offset-
|
25 |
<div class="checkbox">
|
26 |
<label>
|
27 |
<input type="checkbox" name="in_footer" id="in_footer" <?php if(get_option('in_footer')=='on'): ?> checked="checked" <?php endif; ?>>
|
28 |
-
Place code in footer </label>
|
29 |
</div>
|
30 |
</div>
|
31 |
</div>
|
32 |
<div class="form-group">
|
33 |
-
<div class="col-sm-offset-
|
34 |
<div class="checkbox">
|
35 |
<label>
|
36 |
<input type="checkbox" name="track_links" id="track_links" <?php if(get_option('track_links')=='on'): ?> checked="checked" <?php endif; ?>>
|
37 |
-
Track events (Downloads, Mailto & Outbound URLs) </label>
|
38 |
</div>
|
39 |
</div>
|
40 |
</div>
|
41 |
<div class="form-group">
|
42 |
-
<div class="col-sm-offset-
|
43 |
<div class="checkbox">
|
44 |
<label>
|
45 |
<input type="checkbox" name="enable_display" id="enable_display" <?php if(get_option('enable_display')=='on'): ?> checked="checked" <?php endif; ?>>
|
46 |
-
Enable Display Advertising </label>
|
47 |
</div>
|
48 |
</div>
|
49 |
</div>
|
50 |
<div class="form-group">
|
51 |
-
<div class="col-sm-offset-
|
52 |
<div class="checkbox">
|
53 |
<label>
|
54 |
<input type="checkbox" name="anonymize_ip" id="anonymize_ip" <?php if(get_option('anonymize_ip')=='on'): ?> checked="checked" <?php endif; ?>>
|
55 |
-
Anonymize IP </label>
|
56 |
</div>
|
57 |
</div>
|
58 |
</div>
|
59 |
<div class="form-group">
|
60 |
-
<div class="col-sm-offset-
|
61 |
-
<div class="checkbox">
|
62 |
-
<label>
|
63 |
-
<input type="checkbox" name="woo_tracking" id="woo_tracking" <?php if(get_option('woo_tracking')=='on'): ?> checked="checked" <?php endif; ?>>
|
64 |
-
Enable Woocommerce e-commerce tracking <span style="color:green;">New!</span> </label>
|
65 |
-
</div>
|
66 |
-
</div>
|
67 |
-
</div>
|
68 |
-
<div class="form-group">
|
69 |
-
<div class="col-sm-offset-3 col-sm-9">
|
70 |
<div class="checkbox">
|
71 |
<label>
|
72 |
<input type="checkbox" name="set_domain" id="set_domain" <?php if(get_option('set_domain')=='on'): ?> checked="checked" <?php endif; ?>>
|
73 |
-
Set Domain <span style="color:green;">New!</span> <input type="" name="set_domain_domain" id="set_domain_domain" placeholder="nexsuad.com" <?php if(get_option('set_domain')=='on'): ?> value="<?php echo get_option('set_domain_domain'); ?>" <?php endif; ?> /></label>
|
74 |
</div>
|
75 |
</div>
|
76 |
</div>
|
77 |
<div class="form-group">
|
78 |
-
<div class="col-sm-offset-
|
79 |
<?php global $wp_roles;
|
80 |
|
81 |
$roles = $wp_roles->get_names(); ?>
|
82 |
<div class="checkbox">
|
83 |
<label>
|
84 |
<input type="checkbox" name="tracking_off_for_role" id="tracking_off_for_role" <?php if(get_option('tracking_off_for_role')=='on'): ?> checked="checked" <?php endif; ?>>
|
85 |
-
Disable Tracking For
|
86 |
<select id="tracking_off_for_this_role">
|
87 |
<?php foreach($roles as $role) { ?>
|
88 |
<option value="<?php echo $role;?>" <?php if(get_option('tracking_off_for_this_role')== $role){echo 'selected="selected"';} ?>><?php echo $role;?></option>
|
@@ -93,14 +84,18 @@
|
|
93 |
</div>
|
94 |
</div>
|
95 |
<div class="form-group">
|
96 |
-
<div class="col-sm-offset-
|
97 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
|
98 |
<!--<button type="button" class="button button-primary" id="save-gua-settings">Save Changes</button>-->
|
99 |
-
|
100 |
</div>
|
101 |
</form>
|
102 |
</div>
|
103 |
<div class="clearfix"></div>
|
104 |
-
<div class="row col-lg-6"
|
|
|
|
|
|
|
|
|
105 |
</div>
|
106 |
</br>
|
1 |
<div class="wrap">
|
2 |
+
<h2><?php echo __('Google Universal Analytics', 'gua'); ?></h2>
|
3 |
<br />
|
4 |
<div class="col-lg-6 row">
|
5 |
<form class="form-horizontal" method="post" action="options.php" role="form" id="google-universal-options">
|
6 |
<?php settings_fields('google-universal-settings'); ?>
|
7 |
<div class="form-group">
|
8 |
+
<label for="web_property_id" class="col-sm-4 control-label"><?php echo __('Status', 'gua'); ?></label>
|
9 |
+
<div class="col-sm-8">
|
10 |
<input id="plugin_switch" type="checkbox" name="plugin_switch" <?php if(get_option('plugin_switch')=='on'): ?> checked="checked" <?php endif; ?>>
|
11 |
</div>
|
12 |
</div>
|
13 |
<div class="form-group">
|
14 |
+
<label for="web_property_id" class="col-sm-4 control-label"><?php echo __('Tracking ID', 'gua'); ?></label>
|
15 |
+
<div class="col-sm-8">
|
16 |
<input type="text" class="form-control" name="web_property_id" id="web_property_id" placeholder="Tracking code example: UA-23710711-7" value="<?php echo get_option('web_property_id'); ?>">
|
17 |
+
<span class="error hide" id="code-error"><strong><?php echo __('Error!', 'gua'); ?> </strong><?php echo __('match your code with this format: UA-41115660-1', 'gua'); ?> </span> </div>
|
18 |
</div>
|
19 |
<div class="form-group">
|
20 |
+
<label for="web_property_id" class="col-sm-4 control-label"></label>
|
21 |
+
<div class="col-sm-8"> <i><?php echo __('Advanced settings:', 'gua'); ?></i> </div>
|
22 |
</div>
|
23 |
<div class="form-group">
|
24 |
+
<div class="col-sm-offset-4 col-sm-8">
|
25 |
<div class="checkbox">
|
26 |
<label>
|
27 |
<input type="checkbox" name="in_footer" id="in_footer" <?php if(get_option('in_footer')=='on'): ?> checked="checked" <?php endif; ?>>
|
28 |
+
<?php echo __('Place code in footer', 'gua'); ?> </label>
|
29 |
</div>
|
30 |
</div>
|
31 |
</div>
|
32 |
<div class="form-group">
|
33 |
+
<div class="col-sm-offset-4 col-sm-8">
|
34 |
<div class="checkbox">
|
35 |
<label>
|
36 |
<input type="checkbox" name="track_links" id="track_links" <?php if(get_option('track_links')=='on'): ?> checked="checked" <?php endif; ?>>
|
37 |
+
<?php echo __('Track events (Downloads, Mailto & Outbound URLs)', 'gua'); ?> </label>
|
38 |
</div>
|
39 |
</div>
|
40 |
</div>
|
41 |
<div class="form-group">
|
42 |
+
<div class="col-sm-offset-4 col-sm-8">
|
43 |
<div class="checkbox">
|
44 |
<label>
|
45 |
<input type="checkbox" name="enable_display" id="enable_display" <?php if(get_option('enable_display')=='on'): ?> checked="checked" <?php endif; ?>>
|
46 |
+
<?php echo __('Enable Display Advertising', 'gua'); ?> </label>
|
47 |
</div>
|
48 |
</div>
|
49 |
</div>
|
50 |
<div class="form-group">
|
51 |
+
<div class="col-sm-offset-4 col-sm-8">
|
52 |
<div class="checkbox">
|
53 |
<label>
|
54 |
<input type="checkbox" name="anonymize_ip" id="anonymize_ip" <?php if(get_option('anonymize_ip')=='on'): ?> checked="checked" <?php endif; ?>>
|
55 |
+
<?php echo __('Anonymize IP', 'gua'); ?> </label>
|
56 |
</div>
|
57 |
</div>
|
58 |
</div>
|
59 |
<div class="form-group">
|
60 |
+
<div class="col-sm-offset-4 col-sm-8">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
<div class="checkbox">
|
62 |
<label>
|
63 |
<input type="checkbox" name="set_domain" id="set_domain" <?php if(get_option('set_domain')=='on'): ?> checked="checked" <?php endif; ?>>
|
64 |
+
<?php echo __('Set Domain', 'gua'); ?> <span style="color:green;">New!</span> <input type="" name="set_domain_domain" id="set_domain_domain" placeholder="nexsuad.com" <?php if(get_option('set_domain')=='on'): ?> value="<?php echo get_option('set_domain_domain'); ?>" <?php endif; ?> /></label>
|
65 |
</div>
|
66 |
</div>
|
67 |
</div>
|
68 |
<div class="form-group">
|
69 |
+
<div class="col-sm-offset-4 col-sm-8">
|
70 |
<?php global $wp_roles;
|
71 |
|
72 |
$roles = $wp_roles->get_names(); ?>
|
73 |
<div class="checkbox">
|
74 |
<label>
|
75 |
<input type="checkbox" name="tracking_off_for_role" id="tracking_off_for_role" <?php if(get_option('tracking_off_for_role')=='on'): ?> checked="checked" <?php endif; ?>>
|
76 |
+
<?php echo __('Disable Tracking For', 'gua'); ?>
|
77 |
<select id="tracking_off_for_this_role">
|
78 |
<?php foreach($roles as $role) { ?>
|
79 |
<option value="<?php echo $role;?>" <?php if(get_option('tracking_off_for_this_role')== $role){echo 'selected="selected"';} ?>><?php echo $role;?></option>
|
84 |
</div>
|
85 |
</div>
|
86 |
<div class="form-group">
|
87 |
+
<div class="col-sm-offset-4 col-sm-8">
|
88 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
|
89 |
<!--<button type="button" class="button button-primary" id="save-gua-settings">Save Changes</button>-->
|
90 |
+
</div>
|
91 |
</div>
|
92 |
</form>
|
93 |
</div>
|
94 |
<div class="clearfix"></div>
|
95 |
+
<div class="row col-lg-6"><?php echo __('Have a question? Drop us a question at', 'gua'); ?> <a href="http://onlineads.lt/?utm_source=WordPress&utm_medium=Google%20Universal%20Analytics%202.3.2&utm_content=Google%20Universal%20Analytics&utm_campaign=WordPress%20plugins" title="Google Universal Analytics">OnlineAds.lt</a> </div>
|
96 |
+
|
97 |
+
</br></br>
|
98 |
+
<strong>Pro Tip:</strong> For periodic website performance tracking and reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.3.2&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd reporting tool</a>.
|
99 |
+
|
100 |
</div>
|
101 |
</br>
|
readme.txt
CHANGED
@@ -4,10 +4,10 @@ Donate link: http://onlineads.lt/
|
|
4 |
Tags: javascript, tracking, google, analytics, universal, statistics, google analytics, universal analytics, google universal analytics, classic, custom, woocommerce, ecommerce
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.9.1
|
7 |
-
Stable tag: 2.3.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
-
Adds the latest Google Universal Analytics JavaScript tracking code to your WordPress website.
|
11 |
|
12 |
== Description ==
|
13 |
|
@@ -55,6 +55,10 @@ Also, do not hesitate to contact us if you have any questions regarding [Google
|
|
55 |
|
56 |
[Submit your idea at our website](http://onlineads.lt/contact-us/).
|
57 |
|
|
|
|
|
|
|
|
|
58 |
== Screenshots ==
|
59 |
|
60 |
1. Google Universal Analytics plugin interface with additional options.
|
@@ -62,6 +66,10 @@ Also, do not hesitate to contact us if you have any questions regarding [Google
|
|
62 |
|
63 |
== Changelog ==
|
64 |
|
|
|
|
|
|
|
|
|
65 |
= 2.3.1 =
|
66 |
* Now it is possible to set domain manually.
|
67 |
|
@@ -110,6 +118,9 @@ Also, do not hesitate to contact us if you have any questions regarding [Google
|
|
110 |
|
111 |
== Upgrade Notice ==
|
112 |
|
|
|
|
|
|
|
113 |
= 2.3.1 =
|
114 |
* New feature: set domain manually
|
115 |
|
@@ -141,4 +152,4 @@ Also, do not hesitate to contact us if you have any questions regarding [Google
|
|
141 |
Tracking code updated.
|
142 |
|
143 |
= 1.0 =
|
144 |
-
Initial release.
|
4 |
Tags: javascript, tracking, google, analytics, universal, statistics, google analytics, universal analytics, google universal analytics, classic, custom, woocommerce, ecommerce
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.9.1
|
7 |
+
Stable tag: 2.3.2
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
+
Adds the latest Google Universal Analytics JavaScript tracking code to your WordPress website. Many options!
|
11 |
|
12 |
== Description ==
|
13 |
|
55 |
|
56 |
[Submit your idea at our website](http://onlineads.lt/contact-us/).
|
57 |
|
58 |
+
= How can I subscribe to periodic Google Analytics reports? =
|
59 |
+
|
60 |
+
Check it out [nexusAd tool](https://nexusad.com).
|
61 |
+
|
62 |
== Screenshots ==
|
63 |
|
64 |
1. Google Universal Analytics plugin interface with additional options.
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 2.3.2 =
|
70 |
+
* Google Universal Analytics plugin now supports Lithuanian and Spanish languages!
|
71 |
+
* Due to compatibility issues WooCommerce tracking has been removed.
|
72 |
+
|
73 |
= 2.3.1 =
|
74 |
* Now it is possible to set domain manually.
|
75 |
|
118 |
|
119 |
== Upgrade Notice ==
|
120 |
|
121 |
+
= 2.3.2 =
|
122 |
+
* Spanish and Lithuanian language support
|
123 |
+
|
124 |
= 2.3.1 =
|
125 |
* New feature: set domain manually
|
126 |
|
152 |
Tracking code updated.
|
153 |
|
154 |
= 1.0 =
|
155 |
+
* Initial release.
|
woo_code.php
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Google Universal Analytics for WordPress
|
3 |
-
// WooCommerce Google Analytics Integration
|
4 |
-
function ia_wc_ga_integration( $order_id ) {
|
5 |
-
$order = new WC_Order( $order_id ); ?>
|
6 |
-
|
7 |
-
<script type="text/javascript">
|
8 |
-
ga('require', 'ecommerce', 'ecommerce.js'); // Load The Ecommerce Tracking Plugin
|
9 |
-
|
10 |
-
// Transaction Details
|
11 |
-
ga('ecommerce:addTransaction', {
|
12 |
-
'id': '<?php echo $order_id;?>',
|
13 |
-
'affiliation': '<?php echo get_option( "blogname" );?>',
|
14 |
-
'revenue': '<?php echo $order->get_total();?>',
|
15 |
-
'shipping': '<?php echo $order->get_total_shipping();?>',
|
16 |
-
'tax': '<?php echo $order->get_total_tax();?>',
|
17 |
-
'currency': '<?php echo get_woocommerce_currency();?>'
|
18 |
-
});
|
19 |
-
|
20 |
-
|
21 |
-
<?php
|
22 |
-
//Item Details
|
23 |
-
if ( sizeof( $order->get_items() ) > 0 ) {
|
24 |
-
foreach( $order->get_items() as $item ) {
|
25 |
-
$product_cats = get_the_terms( $item["product_id"], 'product_cat' );
|
26 |
-
if ($product_cats) {
|
27 |
-
$cat = $product_cats[0];
|
28 |
-
} ?>
|
29 |
-
ga('ecommerce:addItem', {
|
30 |
-
'id': '<?php echo $order_id;?>',
|
31 |
-
'name': '<?php echo $item['name'];?>',
|
32 |
-
'sku': '<?php echo get_post_meta($item["product_id"], '_sku', true);?>',
|
33 |
-
'category': '<?php echo $cat->name;?>',
|
34 |
-
'price': '<?php echo $item['line_subtotal'];?>',
|
35 |
-
'quantity': '<?php echo $item['qty'];?>',
|
36 |
-
'currency': '<?php echo get_woocommerce_currency();?>'
|
37 |
-
});
|
38 |
-
<?php
|
39 |
-
}
|
40 |
-
} ?>
|
41 |
-
ga('ecommerce:send');
|
42 |
-
</script>
|
43 |
-
<?php }
|
44 |
-
add_action( 'woocommerce_thankyou', 'ia_wc_ga_integration' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|