Version Description
- Tested with WordPress 4.0
- Tracking data to Google is now passed through a secure connection - SSL (even if your website is not using it).
- Enabled User ID tracking by default.
Download this release
Release Info
Developer | audriusd |
Plugin | Google Universal Analytics |
Version | 2.4 |
Comparing to | |
See all releases |
Code changes from version 2.3.4 to 2.4
- classic/classic-analytics.php +1 -1
- classic/custom-analytics.php +1 -1
- googleanalytics.php +5 -9
- options.php +104 -107
- readme.txt +17 -5
- tracking-code.php +9 -11
classic/classic-analytics.php
CHANGED
@@ -55,6 +55,6 @@
|
|
55 |
</form>
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
58 |
-
<div class="row col-lg-6"><?php echo __('Have a question? Drop it at', 'gua'); ?> <a href="http://onlineads.lt/?utm_source=WordPress&utm_medium=Google%20Universal%20Analytics%202.3.4&utm_content=Google%20Classic%20Analytics&utm_campaign=WordPress%20plugins" title="Google Universal Analytics">OnlineAds.lt</a> </div>
|
59 |
|
60 |
|
61 |
</br></br>
|
62 |
<strong>Pro Tip:</strong> For periodic Google Analytics data reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.3.4&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd tool</a>.
|
63 |
|
64 |
|
|
|
65 |
|
66 |
|
67 |
</br></br>
|
68 |
<strong>Pro Tip:</strong> For periodic Google Analytics data reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.4&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd tool</a>.
|
69 |
|
70 |
|
71 |
</div>
|
72 |
</br>
|
55 |
</form>
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
|
|
58 |
|
59 |
|
60 |
</br></br>
|
61 |
<strong>Pro Tip:</strong> For periodic Google Analytics data reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.3.4&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd tool</a>.
|
62 |
|
63 |
|
64 |
+
<div class="row col-lg-6"><?php echo __('Have a question? Drop it at', 'gua'); ?> <a href="http://onlineads.lt/?utm_source=WordPress&utm_medium=Google%20Universal%20Analytics%202.4&utm_content=Google%20Classic%20Analytics&utm_campaign=WordPress%20plugins" title="Google Universal Analytics">OnlineAds.lt</a> </div>
|
65 |
|
66 |
|
67 |
</br></br>
|
68 |
<strong>Pro Tip:</strong> For periodic Google Analytics data reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.4&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd tool</a>.
|
69 |
|
70 |
|
71 |
</div>
|
72 |
</br>
|
classic/custom-analytics.php
CHANGED
@@ -55,6 +55,6 @@
|
|
55 |
</form>
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
58 |
-
<div class="row col-lg-6"><?php echo __('Have a question? Drop it at', 'gua'); ?> <a href="http://onlineads.lt/?utm_source=WordPress&utm_medium=Google%20Universal%20Analytics%202.3.4&utm_content=Google%20Custom%20Analytics&utm_campaign=WordPress%20plugins">OnlineAds.lt</a> </div>
|
59 |
|
60 |
</br></br>
|
61 |
<strong>Pro Tip:</strong> For periodic Google Analytics data reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.3.4&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd tool</a>.
|
62 |
|
|
|
63 |
|
64 |
</br></br>
|
65 |
<strong>Pro Tip:</strong> For periodic Google Analytics data reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.4&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd tool</a>.
|
66 |
|
67 |
</div>
|
68 |
</br>
|
55 |
</form>
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
|
|
58 |
|
59 |
</br></br>
|
60 |
<strong>Pro Tip:</strong> For periodic Google Analytics data reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.3.4&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd tool</a>.
|
61 |
|
62 |
+
<div class="row col-lg-6"><?php echo __('Have a question? Drop it at', 'gua'); ?> <a href="http://onlineads.lt/?utm_source=WordPress&utm_medium=Google%20Universal%20Analytics%202.4&utm_content=Google%20Custom%20Analytics&utm_campaign=WordPress%20plugins">OnlineAds.lt</a> </div>
|
63 |
|
64 |
</br></br>
|
65 |
<strong>Pro Tip:</strong> For periodic Google Analytics data reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.4&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd tool</a>.
|
66 |
|
67 |
</div>
|
68 |
</br>
|
googleanalytics.php
CHANGED
@@ -1,16 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/*
|
4 |
-
|
5 |
-
Plugin
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
Author: Audrius Dobilinskas
|
10 |
Author URI: http://onlineads.lt/
|
11 |
-
|
12 |
*/
|
13 |
-
|
14 |
if (!defined('WP_CONTENT_URL'))
|
15 |
|
16 |
define('WP_CONTENT_URL', get_option('siteurl').'/wp-content');
|
1 |
<?php
|
|
|
2 |
/*
|
3 |
+
Plugin Name: Google Universal Analytics
|
4 |
+
Plugin URI: http://wordpress.org/extend/plugins/google-universal-analytics/
|
5 |
+
Description: Adds <a href="http://www.google.com/analytics/">Google Analytics</a> tracking code on all pages.
|
6 |
+
Version: 2.4
|
7 |
+
Author: Audrius Dobilinskas
|
|
|
8 |
Author URI: http://onlineads.lt/
|
|
|
9 |
*/
|
|
|
10 |
if (!defined('WP_CONTENT_URL'))
|
11 |
|
12 |
define('WP_CONTENT_URL', get_option('siteurl').'/wp-content');
|
options.php
CHANGED
@@ -1,111 +1,108 @@
|
|
1 |
<div class="wrap">
|
2 |
-
|
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 (<em>Downloads, Mailto, Outbound URLs & Phone calls tracking</em>)', '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 (<em>Remarketing, Demographics and Interests</em>)', '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="enhancedlink_u" id="enhancedlink_u" <?php if(get_option('enhancedlink_u')=='on'): ?> checked="checked" <?php endif; ?>>
|
64 |
-
<?php echo __('Enhanced Link Attribution', 'gua'); ?> <span style="color:green;">New!</span>
|
65 |
-
</label>
|
66 |
-
</div>
|
67 |
-
</div>
|
68 |
-
</div>
|
69 |
-
<div class="form-group">
|
70 |
-
<div class="col-sm-offset-4 col-sm-8">
|
71 |
-
<div class="checkbox">
|
72 |
-
<label>
|
73 |
-
<input type="checkbox" name="set_domain" id="set_domain" <?php if(get_option('set_domain')=='on'): ?> checked="checked" <?php endif; ?>>
|
74 |
-
<?php echo __('Set Domain', 'gua'); ?> <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>
|
75 |
-
</div>
|
76 |
-
</div>
|
77 |
-
</div>
|
78 |
-
<div class="form-group">
|
79 |
-
<div class="col-sm-offset-4 col-sm-8">
|
80 |
-
<?php global $wp_roles;
|
81 |
-
|
82 |
-
$roles = $wp_roles->get_names(); ?>
|
83 |
-
<div class="checkbox">
|
84 |
-
<label>
|
85 |
-
<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; ?>>
|
86 |
-
<?php echo __('Disable Tracking For', 'gua'); ?>
|
87 |
-
<select id="tracking_off_for_this_role">
|
88 |
-
<?php foreach($roles as $role) { ?>
|
89 |
-
<option value="<?php echo $role;?>" <?php if(get_option('tracking_off_for_this_role')== $role){echo 'selected="selected"';} ?>><?php echo $role;?></option>
|
90 |
-
<?php } ?>
|
91 |
-
</select>
|
92 |
-
</label>
|
93 |
-
</div>
|
94 |
-
</div>
|
95 |
-
</div>
|
96 |
-
<div class="form-group">
|
97 |
-
<div class="col-sm-offset-4 col-sm-8">
|
98 |
-
<input type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
|
99 |
-
<!--<button type="button" class="button button-primary" id="save-gua-settings">Save Changes</button>-->
|
100 |
-
</div>
|
101 |
-
</div>
|
102 |
-
</form>
|
103 |
<div id="message" class="updated">
|
104 |
<p><strong><?php _e('Settings saved.') ?></strong></p>
|
105 |
</div>
|
106 |
<?php } ?>
|
107 |
|
108 |
<h2><?php echo __('Google Universal Analytics', 'gua'); ?></h2>
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
</div>
|
111 |
<div class="clearfix"></div>
|
112 |
-
<div class="row col-lg-6"><?php echo __('Have a question? Drop it at', 'gua'); ?> <a href="http://onlineads.lt/?utm_source=WordPress&utm_medium=Google%20Universal%20Analytics%202.
|
113 |
-
|
114 |
-
</
|
115 |
-
<strong>Pro Tip:</strong> For periodic Google Analytics data reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.3.4&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd tool</a>.
|
116 |
-
|
117 |
-
</div>
|
118 |
|
|
|
119 |
</br>
|
1 |
<div class="wrap">
|
2 |
+
<?php if( isset($_GET['settings-updated']) ) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
<div id="message" class="updated">
|
4 |
<p><strong><?php _e('Settings saved.') ?></strong></p>
|
5 |
</div>
|
6 |
<?php } ?>
|
7 |
|
8 |
<h2><?php echo __('Google Universal Analytics', 'gua'); ?></h2>
|
9 |
|
10 |
+
<br />
|
11 |
+
<div class="col-lg-6 row">
|
12 |
+
<form class="form-horizontal" method="post" action="options.php" role="form" id="google-universal-options">
|
13 |
+
<?php settings_fields('google-universal-settings'); ?>
|
14 |
+
<div class="form-group">
|
15 |
+
<label for="web_property_id" class="col-sm-4 control-label"><?php echo __('Status', 'gua'); ?></label>
|
16 |
+
<div class="col-sm-8">
|
17 |
+
<input id="plugin_switch" type="checkbox" name="plugin_switch" <?php if(get_option('plugin_switch')=='on'): ?> checked="checked" <?php endif; ?>>
|
18 |
+
</div>
|
19 |
+
</div>
|
20 |
+
<div class="form-group">
|
21 |
+
<label for="web_property_id" class="col-sm-4 control-label"><?php echo __('Tracking ID', 'gua'); ?></label>
|
22 |
+
<div class="col-sm-8">
|
23 |
+
<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'); ?>">
|
24 |
+
<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>
|
25 |
+
</div>
|
26 |
+
<div class="form-group">
|
27 |
+
<label for="web_property_id" class="col-sm-4 control-label"></label>
|
28 |
+
<div class="col-sm-8"> <i><?php echo __('Advanced settings:', 'gua'); ?></i> </div>
|
29 |
+
</div>
|
30 |
+
<div class="form-group">
|
31 |
+
<div class="col-sm-offset-4 col-sm-8">
|
32 |
+
<div class="checkbox">
|
33 |
+
<label>
|
34 |
+
<input type="checkbox" name="in_footer" id="in_footer" <?php if(get_option('in_footer')=='on'): ?> checked="checked" <?php endif; ?>>
|
35 |
+
<?php echo __('Place code in footer', 'gua'); ?> </label>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
<div class="form-group">
|
40 |
+
<div class="col-sm-offset-4 col-sm-8">
|
41 |
+
<div class="checkbox">
|
42 |
+
<label>
|
43 |
+
<input type="checkbox" name="track_links" id="track_links" <?php if(get_option('track_links')=='on'): ?> checked="checked" <?php endif; ?>>
|
44 |
+
<?php echo __('Track events (<em>Downloads, Mailto, Outbound URLs & Phone calls tracking</em>)', 'gua'); ?> </label>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
<div class="form-group">
|
49 |
+
<div class="col-sm-offset-4 col-sm-8">
|
50 |
+
<div class="checkbox">
|
51 |
+
<label>
|
52 |
+
<input type="checkbox" name="enable_display" id="enable_display" <?php if(get_option('enable_display')=='on'): ?> checked="checked" <?php endif; ?>>
|
53 |
+
<?php echo __('Enable Display Advertising (<em>Remarketing, Demographics and Interests</em>)', 'gua'); ?> </label>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
<div class="form-group">
|
58 |
+
<div class="col-sm-offset-4 col-sm-8">
|
59 |
+
<div class="checkbox">
|
60 |
+
<label>
|
61 |
+
<input type="checkbox" name="anonymize_ip" id="anonymize_ip" <?php if(get_option('anonymize_ip')=='on'): ?> checked="checked" <?php endif; ?>>
|
62 |
+
<?php echo __('Anonymize IP', 'gua'); ?> </label>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<div class="form-group">
|
67 |
+
<div class="col-sm-offset-4 col-sm-8">
|
68 |
+
<div class="checkbox">
|
69 |
+
<label>
|
70 |
+
<input type="checkbox" name="enhancedlink_u" id="enhancedlink_u" <?php if(get_option('enhancedlink_u')=='on'): ?> checked="checked" <?php endif; ?>>
|
71 |
+
<?php echo __('Enhanced Link Attribution', 'gua'); ?> <!--span style="color:green;">New!</span -->
|
72 |
+
</label>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
<div class="form-group">
|
77 |
+
<div class="col-sm-offset-4 col-sm-8">
|
78 |
+
<div class="checkbox">
|
79 |
+
<label>
|
80 |
+
<input type="checkbox" name="set_domain" id="set_domain" <?php if(get_option('set_domain')=='on'): ?> checked="checked" <?php endif; ?>>
|
81 |
+
<?php echo __('Set Domain', 'gua'); ?> <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>
|
82 |
+
</div>
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
<div class="form-group">
|
86 |
+
<div class="col-sm-offset-4 col-sm-8">
|
87 |
+
<?php global $wp_roles;
|
88 |
+
$roles = $wp_roles->get_names(); ?>
|
89 |
+
<div class="checkbox">
|
90 |
+
<label>
|
91 |
+
<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; ?>>
|
92 |
+
<?php echo __('Disable Tracking For', 'gua'); ?>
|
93 |
+
<select id="tracking_off_for_this_role">
|
94 |
+
<?php foreach($roles as $role) { ?>
|
95 |
+
<option value="<?php echo $role;?>" <?php if(get_option('tracking_off_for_this_role')== $role){echo 'selected="selected"';} ?>><?php echo $role;?></option>
|
96 |
+
<?php } ?>
|
97 |
+
</select>
|
98 |
+
</label>
|
99 |
+
</div>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
<div class="form-group">
|
103 |
+
<div class="col-sm-offset-4 col-sm-8">
|
104 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
|
105 |
+
<!--<button type="button" class="button button-primary" id="save-gua-settings">Save Changes</button>-->
|
106 |
+
</div>
|
107 |
+
</div>
|
108 |
+
</form>
|
109 |
</div>
|
110 |
<div class="clearfix"></div>
|
111 |
+
<div class="row col-lg-6"><?php echo __('Have a question? Drop it at', 'gua'); ?> <a href="http://onlineads.lt/?utm_source=WordPress&utm_medium=Google%20Universal%20Analytics%202.4&utm_content=Google%20Universal%20Analytics&utm_campaign=WordPress%20plugins" title="Google Universal Analytics">OnlineAds.lt</a> </div>
|
112 |
+
</br></br>
|
113 |
+
<strong>Pro Tip:</strong> For periodic Google Analytics data reporting use <a href="https://nexusad.com/?utm_source=wordpress&utm_medium=Google%2BUniversal%2BAnalytics%2B2.4&utm_campaign=wp_plugins" title="nexusAd" target="_blank">nexusAd tool</a>.
|
|
|
|
|
|
|
114 |
|
115 |
+
</div>
|
116 |
</br>
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Google Universal Analytics ===
|
2 |
Contributors: audriusd
|
3 |
Donate link: http://onlineads.lt/
|
4 |
-
Tags: javascript, tracking, google, analytics, universal, statistics, google analytics, universal analytics, google universal analytics, classic, custom, nexusad
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Adds the latest Google Universal Analytics JavaScript tracking code to your WordPress website. Many options!
|
@@ -15,10 +15,12 @@ Adding Google Analytics code to your website has never been easier. Simply copy
|
|
15 |
|
16 |
Why Google Universal Analytics is better than the usual Google Analytics?
|
17 |
|
|
|
18 |
* Event tracking (track downloads, mailto links, clicks on external URLs and Call tracking);
|
19 |
-
* Remarketing;
|
20 |
* Demographics and Interests reporting;
|
21 |
* IP Anonymization;
|
|
|
22 |
* Enhanced Link Attribution;
|
23 |
* Custom domain configuration;
|
24 |
* Disable Google Analytics tracking for specific WordPress users;
|
@@ -61,7 +63,7 @@ Also, do not hesitate to contact us if you have any questions regarding [Google
|
|
61 |
|
62 |
[Submit your idea at our website](http://onlineads.lt/contact-us/).
|
63 |
|
64 |
-
= How can I subscribe to periodic Google Analytics reports? =
|
65 |
|
66 |
Check it out [nexusAd tool](https://nexusad.com).
|
67 |
|
@@ -72,6 +74,11 @@ Check it out [nexusAd tool](https://nexusad.com).
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
|
|
|
|
75 |
= 2.3.4 =
|
76 |
* Support for Gzip archive (.gz), Torrent (.torrent) and ComicBook Reader File (.cbr) tracking (event tracking) added.
|
77 |
* Clicks on phone numbers (tel:...) are now tracked as events.
|
@@ -132,6 +139,11 @@ Check it out [nexusAd tool](https://nexusad.com).
|
|
132 |
|
133 |
== Upgrade Notice ==
|
134 |
|
|
|
|
|
|
|
|
|
|
|
135 |
= 2.3.4 =
|
136 |
* Support for Gzip archive (.gz), Torrent (.torrent) and ComicBook Reader File (.cbr) tracking (event tracking) added.
|
137 |
* Clicks on phone numbers (tel:...) are now tracked as events.
|
1 |
=== Google Universal Analytics ===
|
2 |
Contributors: audriusd
|
3 |
Donate link: http://onlineads.lt/
|
4 |
+
Tags: javascript, tracking, google, analytics, universal, statistics, google analytics, universal analytics, user id, google universal analytics, classic, custom, nexusad
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 4.0
|
7 |
+
Stable tag: 2.4
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Adds the latest Google Universal Analytics JavaScript tracking code to your WordPress website. Many options!
|
15 |
|
16 |
Why Google Universal Analytics is better than the usual Google Analytics?
|
17 |
|
18 |
+
* User ID tracking (track user across different devices);
|
19 |
* Event tracking (track downloads, mailto links, clicks on external URLs and Call tracking);
|
20 |
+
* Remarketing (Google AdWords, Display Advertising);
|
21 |
* Demographics and Interests reporting;
|
22 |
* IP Anonymization;
|
23 |
+
* SSL security for tracking data;
|
24 |
* Enhanced Link Attribution;
|
25 |
* Custom domain configuration;
|
26 |
* Disable Google Analytics tracking for specific WordPress users;
|
63 |
|
64 |
[Submit your idea at our website](http://onlineads.lt/contact-us/).
|
65 |
|
66 |
+
= How can I create and subscribe to periodic Google Analytics reports? =
|
67 |
|
68 |
Check it out [nexusAd tool](https://nexusad.com).
|
69 |
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 2.4 =
|
78 |
+
* Tested with WordPress 4.0
|
79 |
+
* Tracking data to Google is now passed through a secure connection - SSL (even if your website is not using it).
|
80 |
+
* Enabled User ID tracking by default.
|
81 |
+
|
82 |
= 2.3.4 =
|
83 |
* Support for Gzip archive (.gz), Torrent (.torrent) and ComicBook Reader File (.cbr) tracking (event tracking) added.
|
84 |
* Clicks on phone numbers (tel:...) are now tracked as events.
|
139 |
|
140 |
== Upgrade Notice ==
|
141 |
|
142 |
+
= 2.4 =
|
143 |
+
* WordPress 4.0 compatability.
|
144 |
+
* User ID tracking.
|
145 |
+
* Improved security of Google Analytics data (SSL layer added).
|
146 |
+
|
147 |
= 2.3.4 =
|
148 |
* Support for Gzip archive (.gz), Torrent (.torrent) and ComicBook Reader File (.cbr) tracking (event tracking) added.
|
149 |
* Clicks on phone numbers (tel:...) are now tracked as events.
|
tracking-code.php
CHANGED
@@ -3,28 +3,26 @@ $web_property_id = get_option( 'web_property_id' );
|
|
3 |
$track_links = get_option('track_links');
|
4 |
$enable_display = get_option('enable_display');
|
5 |
$anonymize_ip = get_option('anonymize_ip');
|
6 |
-
$enhancedlink_u =
|
7 |
if(get_option('set_domain')=='on'){
|
8 |
$homeurl = get_option('set_domain_domain');
|
9 |
-
}else{
|
10 |
-
$homeurl = get_option('home');
|
11 |
}
|
12 |
$find = array( 'http://', 'https://', 'www.' );
|
13 |
$replace = '';
|
14 |
-
$homeurl = str_replace( $find, $replace, $homeurl );
|
15 |
get_currentuserinfo();
|
16 |
?>
|
17 |
-
<!-- Google Universal Analytics for WordPress v2.
|
18 |
<script>
|
19 |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
20 |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
21 |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
22 |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
23 |
-
ga('create', '<?php echo $web_property_id; ?>', '
|
24 |
-
<?php if($anonymize_ip=='on'): ?> ga('set', 'anonymizeIp', true);<?php endif; ?>
|
25 |
-
<?php if($enhancedlink_u=='on'): ?> ga('require', 'linkid', 'linkid.js');<?php endif; ?>
|
26 |
-
<?php if($enable_display=='on'): ?> ga('require', 'displayfeatures');<?php endif; ?>
|
27 |
-
ga('
|
28 |
-
</script>
|
29 |
<?php if($track_links=='on'): ?>
|
30 |
<script type="text/javascript">
|
31 |
jQuery(document).ready(function(e) {
|
3 |
$track_links = get_option('track_links');
|
4 |
$enable_display = get_option('enable_display');
|
5 |
$anonymize_ip = get_option('anonymize_ip');
|
6 |
+
$enhancedlink_u = get_option('enhancedlink_u');
|
7 |
if(get_option('set_domain')=='on'){
|
8 |
$homeurl = get_option('set_domain_domain');
|
|
|
|
|
9 |
}
|
10 |
$find = array( 'http://', 'https://', 'www.' );
|
11 |
$replace = '';
|
12 |
+
$homeurl = str_replace( $find, $replace, $homeurl );
|
13 |
get_currentuserinfo();
|
14 |
?>
|
15 |
+
<!-- Google Universal Analytics for WordPress v2.4 -->
|
16 |
<script>
|
17 |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
18 |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
19 |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
20 |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
21 |
+
ga('create', '<?php echo $web_property_id; ?>', 'auto');<?php echo "\n\r" ?>
|
22 |
+
<?php if($anonymize_ip=='on'): ?> ga('set', 'anonymizeIp', true);<?php endif; ?><?php echo "\n\r" ?>
|
23 |
+
<?php if($enhancedlink_u=='on'): ?> ga('require', 'linkid', 'linkid.js');<?php endif; ?><?php echo "\n\r" ?>
|
24 |
+
<?php if($enable_display=='on'): ?> ga('require', 'displayfeatures');<?php endif; ?><?php echo "\n\r" ?>
|
25 |
+
ga('set', 'forceSSL', true);<?php echo "\n\r" ?>
|
26 |
+
</script>
|
27 |
<?php if($track_links=='on'): ?>
|
28 |
<script type="text/javascript">
|
29 |
jQuery(document).ready(function(e) {
|