GA Google Analytics - Version 20190902

Version Description

To upgrade GA Google Analytics, remove the old version and replace with the new version. Or just click "Update" from the Plugins screen and let WordPress do it for you automatically.

Note: uninstalling the plugin from the WP Plugins screen results in the removal of all settings from the WP database.

For more information, visit the GA Plugin Homepage.

Download this release

Release Info

Developer specialk
Plugin Icon 128x128 GA Google Analytics
Version 20190902
Comparing to
See all releases

Code changes from version 20190501 to 20190902

ga-google-analytics.php CHANGED
@@ -10,8 +10,8 @@
10
Contributors: specialk
11
Requires at least: 4.1
12
Tested up to: 5.2
13
- Stable tag: 20190501
14
- Version: 20190501
15
Requires PHP: 5.6.20
16
Text Domain: ga-google-analytics
17
Domain Path: /languages
@@ -60,7 +60,7 @@ if (!class_exists('GA_Google_Analytics')) {
60
61
function constants() {
62
63
- if (!defined('GAP_VERSION')) define('GAP_VERSION', '20190501');
64
if (!defined('GAP_REQUIRE')) define('GAP_REQUIRE', '4.1');
65
if (!defined('GAP_AUTHOR')) define('GAP_AUTHOR', 'Jeff Starr');
66
if (!defined('GAP_NAME')) define('GAP_NAME', __('GA Google Analytics', 'ga-google-analytics'));
10
Contributors: specialk
11
Requires at least: 4.1
12
Tested up to: 5.2
13
+ Stable tag: 20190902
14
+ Version: 20190902
15
Requires PHP: 5.6.20
16
Text Domain: ga-google-analytics
17
Domain Path: /languages
60
61
function constants() {
62
63
+ if (!defined('GAP_VERSION')) define('GAP_VERSION', '20190902');
64
if (!defined('GAP_REQUIRE')) define('GAP_REQUIRE', '4.1');
65
if (!defined('GAP_AUTHOR')) define('GAP_AUTHOR', 'Jeff Starr');
66
if (!defined('GAP_NAME')) define('GAP_NAME', __('GA Google Analytics', 'ga-google-analytics'));
inc/plugin-core.php CHANGED
@@ -77,6 +77,7 @@ function ga_google_analytics_universal() {
77
extract(ga_google_analytics_options());
78
79
$custom_code = ga_google_analytics_custom($custom_code);
80
81
$ga_display = "ga('require', 'displayfeatures');";
82
$ga_link = "ga('require', 'linkid');";
@@ -90,8 +91,12 @@ function ga_google_analytics_universal() {
90
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
91
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
92
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
93
- <?php if ($custom_code) echo "\t\t\t" . $custom_code . "\n"; ?>
94
ga('create', '<?php echo $tracking_id; ?>', 'auto'<?php if ($tracker_object) echo ', '. $tracker_object; ?>);
95
<?php
96
if ($display_ads) echo $ga_display . "\n\t\t\t";
97
if ($link_attr) echo $ga_link . "\n\t\t\t";
@@ -109,6 +114,7 @@ function ga_google_analytics_global() {
109
extract(ga_google_analytics_options());
110
111
$custom_code = ga_google_analytics_custom($custom_code);
112
113
?>
114
@@ -116,8 +122,12 @@ function ga_google_analytics_global() {
116
<script>
117
window.dataLayer = window.dataLayer || [];
118
function gtag(){dataLayer.push(arguments);}
119
- <?php if ($custom_code) echo "\t\t\t" . $custom_code . "\n"; ?>
120
gtag('js', new Date());
121
gtag('config', '<?php echo $tracking_id; ?>'<?php if ($tracker_object) echo ', '. $tracker_object; ?>);
122
</script>
123
77
extract(ga_google_analytics_options());
78
79
$custom_code = ga_google_analytics_custom($custom_code);
80
+ $custom_code = explode(PHP_EOL, $custom_code);
81
82
$ga_display = "ga('require', 'displayfeatures');";
83
$ga_link = "ga('require', 'linkid');";
91
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
92
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
93
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
94
ga('create', '<?php echo $tracking_id; ?>', 'auto'<?php if ($tracker_object) echo ', '. $tracker_object; ?>);
95
+ <?php
96
+ if ($custom_code) {
97
+ foreach ($custom_code as $c) echo "\t\t\t" . trim($c) . "\n";
98
+ }
99
+ ?>
100
<?php
101
if ($display_ads) echo $ga_display . "\n\t\t\t";
102
if ($link_attr) echo $ga_link . "\n\t\t\t";
114
extract(ga_google_analytics_options());
115
116
$custom_code = ga_google_analytics_custom($custom_code);
117
+ $custom_code = explode(PHP_EOL, $custom_code);
118
119
?>
120
122
<script>
123
window.dataLayer = window.dataLayer || [];
124
function gtag(){dataLayer.push(arguments);}
125
gtag('js', new Date());
126
+ <?php
127
+ if ($custom_code) {
128
+ foreach ($custom_code as $c) echo "\t\t\t" . trim($c) . "\n";
129
+ }
130
+ ?>
131
gtag('config', '<?php echo $tracking_id; ?>'<?php if ($tracker_object) echo ', '. $tracker_object; ?>);
132
</script>
133
inc/settings-display.php CHANGED
@@ -174,7 +174,7 @@ if (!function_exists('add_action')) die(); ?>
174
<?php esc_html_e('for Global Site Tag. This is useful for things like', 'ga-google-analytics'); ?>
175
<a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers"><?php esc_html_e('tracker objects', 'ga-google-analytics'); ?></a>
176
<?php esc_html_e('and', 'ga-google-analytics'); ?>
177
- <a target="_blank" rel="noopener noreferrer" href="https://support.google.com/360suite/optimize/"><?php esc_html_e('optimize', 'ga-google-analytics'); ?></a>.
178
</div>
179
</td>
180
</tr>
@@ -213,7 +213,7 @@ if (!function_exists('add_action')) die(); ?>
213
<th><label for="gap_options[admin_area]"><?php esc_html_e('Admin Area', 'ga-google-analytics') ?></label></th>
214
<td>
215
<input id="gap_options[admin_area]" name="gap_options[admin_area]" type="checkbox" value="1" <?php if (isset($gap_options['admin_area'])) checked('1', $gap_options['admin_area']); ?>>
216
- <?php esc_html_e('Enable GA in the WordPress Admin Area', 'ga-google-analytics'); ?>
217
</td>
218
</tr>
219
<tr>
174
<?php esc_html_e('for Global Site Tag. This is useful for things like', 'ga-google-analytics'); ?>
175
<a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers"><?php esc_html_e('tracker objects', 'ga-google-analytics'); ?></a>
176
<?php esc_html_e('and', 'ga-google-analytics'); ?>
177
+ <a target="_blank" rel="noopener noreferrer" href="https://support.google.com/optimize/answer/6262084"><?php esc_html_e('optimize', 'ga-google-analytics'); ?></a>.
178
</div>
179
</td>
180
</tr>
213
<th><label for="gap_options[admin_area]"><?php esc_html_e('Admin Area', 'ga-google-analytics') ?></label></th>
214
<td>
215
<input id="gap_options[admin_area]" name="gap_options[admin_area]" type="checkbox" value="1" <?php if (isset($gap_options['admin_area'])) checked('1', $gap_options['admin_area']); ?>>
216
+ <?php esc_html_e('Enable GA tracking in the WordPress Admin Area', 'ga-google-analytics'); ?>
217
</td>
218
</tr>
219
<tr>
languages/ga-google-analytics.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
msgstr ""
4
"Project-Id-Version: GA Google Analytics\n"
5
"Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2019-03-13 00:51+0000\n"
7
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
"Language-Team: \n"
@@ -190,7 +190,7 @@ msgstr ""
190
msgid "Choose either"
191
msgstr ""
192
193
- #: inc/settings-display.php:76 inc/support-panel.php:62
194
msgid "or"
195
msgstr ""
196
@@ -368,7 +368,7 @@ msgid "Admin Area"
368
msgstr ""
369
370
#: inc/settings-display.php:216
371
- msgid "Enable GA in the WordPress Admin Area"
372
msgstr ""
373
374
#: inc/settings-display.php:220
@@ -419,51 +419,51 @@ msgstr ""
419
msgid "Obsessive Web Development"
420
msgstr ""
421
422
- #: inc/support-panel.php:52
423
msgid "Perishable Press Books"
424
msgstr ""
425
426
- #: inc/support-panel.php:53
427
msgid "Plugin Planet"
428
msgstr ""
429
430
- #: inc/support-panel.php:54
431
msgid "Donate via PayPal"
432
msgstr ""
433
434
- #: inc/support-panel.php:56
435
msgid "books"
436
msgstr ""
437
438
- #: inc/support-panel.php:57
439
msgid "plugins"
440
msgstr ""
441
442
- #: inc/support-panel.php:58
443
msgid "donation"
444
msgstr ""
445
446
- #: inc/support-panel.php:60
447
msgid "Thank you for using"
448
msgstr ""
449
450
- #: inc/support-panel.php:61
451
msgid "Please show support by purchasing one of my"
452
msgstr ""
453
454
- #: inc/support-panel.php:62
455
msgid "or by making a"
456
msgstr ""
457
458
- #: inc/support-panel.php:63
459
msgid "Your generous support helps to ensure future development of"
460
msgstr ""
461
462
- #: inc/support-panel.php:64
463
msgid "and is greatly appreciated."
464
msgstr ""
465
466
- #: inc/support-panel.php:66
467
msgid ""
468
"Any size donation helps me to continue developing this free plugin and other "
469
"awesome WordPress resources."
3
msgstr ""
4
"Project-Id-Version: GA Google Analytics\n"
5
"Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2019-08-25 16:56+0000\n"
7
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
"Language-Team: \n"
190
msgid "Choose either"
191
msgstr ""
192
193
+ #: inc/settings-display.php:76 inc/support-panel.php:65
194
msgid "or"
195
msgstr ""
196
368
msgstr ""
369
370
#: inc/settings-display.php:216
371
+ msgid "Enable GA tracking in the WordPress Admin Area"
372
msgstr ""
373
374
#: inc/settings-display.php:220
419
msgid "Obsessive Web Development"
420
msgstr ""
421
422
+ #: inc/support-panel.php:55
423
msgid "Perishable Press Books"
424
msgstr ""
425
426
+ #: inc/support-panel.php:56
427
msgid "Plugin Planet"
428
msgstr ""
429
430
+ #: inc/support-panel.php:57
431
msgid "Donate via PayPal"
432
msgstr ""
433
434
+ #: inc/support-panel.php:59
435
msgid "books"
436
msgstr ""
437
438
+ #: inc/support-panel.php:60
439
msgid "plugins"
440
msgstr ""
441
442
+ #: inc/support-panel.php:61
443
msgid "donation"
444
msgstr ""
445
446
+ #: inc/support-panel.php:63
447
msgid "Thank you for using"
448
msgstr ""
449
450
+ #: inc/support-panel.php:64
451
msgid "Please show support by purchasing one of my"
452
msgstr ""
453
454
+ #: inc/support-panel.php:65
455
msgid "or by making a"
456
msgstr ""
457
458
+ #: inc/support-panel.php:66
459
msgid "Your generous support helps to ensure future development of"
460
msgstr ""
461
462
+ #: inc/support-panel.php:67
463
msgid "and is greatly appreciated."
464
msgstr ""
465
466
+ #: inc/support-panel.php:69
467
msgid ""
468
"Any size donation helps me to continue developing this free plugin and other "
469
"awesome WordPress resources."
readme.txt CHANGED
@@ -10,8 +10,8 @@ Donate link: https://monzillamedia.com/donate.html
10
Contributors: specialk
11
Requires at least: 4.1
12
Tested up to: 5.2
13
- Stable tag: 20190501
14
- Version: 20190501
15
Requires PHP: 5.6.20
16
Text Domain: ga-google-analytics
17
Domain Path: /languages
@@ -60,10 +60,10 @@ This is a lightweight plugin that inserts the required GA tracking code. To view
60
* Supports [IP Anonymization](https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization)
61
* Supports [Force SSL](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL)
62
* Supports [Tracker Objects](https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers)
63
- * Supports [Google Optimize](https://support.google.com/360suite/optimize/)
64
* Supports [User Opt-Out](https://developers.google.com/analytics/devguides/collection/analyticsjs/user-opt-out)
65
66
- Also supports tracking links and conversions via the Custom Code setting. Learn more about [Google Analytics](http://www.google.com/analytics/)!
67
68
**Pro Version**
69
@@ -107,7 +107,7 @@ After configuring your settings, you can verify that GA tracking code is include
107
108
__Note:__ this plugin adds the required GA code to your web pages. In order for the code to do anything, it must correspond to an active, properly configured Google Analytics account. Learn more at the [Google Analytics Help Center](https://support.google.com/analytics/?hl=en#topic=3544906).
109
110
- [More info on installing WP plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins)
111
112
113
**Usage**
@@ -214,10 +214,24 @@ Here are the steps:
214
215
Done! You can view the source code of your web pages to verify the results.
216
217
218
**Got a question?**
219
220
- To ask a question, suggest a feature, or provide feedback, [contact me directly](https://perishablepress.com/contact/). Learn more about [Google Analytics](http://www.google.com/analytics/) and [GA tracking methods](https://perishablepress.com/3-ways-track-google-analytics/).
221
222
223
@@ -251,6 +265,15 @@ If you like GA Google Analytics, please take a moment to [give a 5-star rating](
251
> New Pro version available! Check out [GA Pro &raquo;](https://plugin-planet.com/ga-google-analytics-pro/)
252
253
254
**20190501**
255
256
* Bumps [minimum PHP version](https://codex.wordpress.org/Template:Server_requirements) to 5.6.20
@@ -387,9 +410,9 @@ If you like GA Google Analytics, please take a moment to [give a 5-star rating](
387
* Tested on WordPress 4.4 (beta)
388
* Updated minimum version requirement
389
* Updated heading hierarchy on settings page
390
- * Added option to disable GA for admin users (Thanks to [Daniele Raimondi](http://w3b.it/))
391
- * Added support for IP anonymization (Thanks to [Daniele Raimondi](http://w3b.it/))
392
- * Added support for Force SSL (Thanks to [Česlav Przywara](http://www.bluechip.at/))
393
* Cleaned up some "Undefined index" Notices
394
* Removed 404 link from Important Notice panel
395
* Updated Google links in the Overview panel
10
Contributors: specialk
11
Requires at least: 4.1
12
Tested up to: 5.2
13
+ Stable tag: 20190902
14
+ Version: 20190902
15
Requires PHP: 5.6.20
16
Text Domain: ga-google-analytics
17
Domain Path: /languages
60
* Supports [IP Anonymization](https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization)
61
* Supports [Force SSL](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL)
62
* Supports [Tracker Objects](https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers)
63
+ * Supports [Google Optimize](https://support.google.com/optimize/answer/6262084)
64
* Supports [User Opt-Out](https://developers.google.com/analytics/devguides/collection/analyticsjs/user-opt-out)
65
66
+ Also supports tracking links and conversions via the Custom Code setting. Learn more about [Google Analytics](https://www.google.com/analytics/)!
67
68
**Pro Version**
69
107
108
__Note:__ this plugin adds the required GA code to your web pages. In order for the code to do anything, it must correspond to an active, properly configured Google Analytics account. Learn more at the [Google Analytics Help Center](https://support.google.com/analytics/?hl=en#topic=3544906).
109
110
+ [More info on installing WP plugins](https://codex.wordpress.org/Managing_Plugins#Installing_Plugins)
111
112
113
**Usage**
214
215
Done! You can view the source code of your web pages to verify the results.
216
217
+ More info about [Google Optimize](https://support.google.com/optimize/answer/6262084).
218
+
219
+
220
+ **How to enable Opt-out of tracking?**
221
+
222
+ Here are the steps:
223
+
224
+ 1. Add the following code to the plugin setting, "Custom Code": `<script>window['ga-disable-UA-XXXXX-Y'] = true;</script>`
225
+ 2. Check the box to enable the setting, "Custom Code Location".
226
+
227
+ Done! You can view the source code of your web pages to verify the results.
228
+
229
+ More info about [user opt-out](https://developers.google.com/analytics/devguides/collection/analyticsjs/user-opt-out).
230
+
231
232
**Got a question?**
233
234
+ To ask a question, suggest a feature, or provide feedback, [contact me directly](https://perishablepress.com/contact/). Learn more about [Google Analytics](https://www.google.com/analytics/) and [GA tracking methods](https://perishablepress.com/3-ways-track-google-analytics/).
235
236
237
265
> New Pro version available! Check out [GA Pro &raquo;](https://plugin-planet.com/ga-google-analytics-pro/)
266
267
268
+ **20190902**
269
+
270
+ * Changes order of custom code output
271
+ * Improves output of GA tracking markup
272
+ * Improves clarity of settings information
273
+ * Updates some links to https
274
+ * Generates new default translation template
275
+ * Tests on WordPress 5.3 (alpha)
276
+
277
**20190501**
278
279
* Bumps [minimum PHP version](https://codex.wordpress.org/Template:Server_requirements) to 5.6.20
410
* Tested on WordPress 4.4 (beta)
411
* Updated minimum version requirement
412
* Updated heading hierarchy on settings page
413
+ * Added option to disable GA for admin users (Thanks to [Daniele Raimondi](https://w3b.it/))
414
+ * Added support for IP anonymization (Thanks to [Daniele Raimondi](https://w3b.it/))
415
+ * Added support for Force SSL (Thanks to [Česlav Przywara](https://www.bluechip.at/))
416
* Cleaned up some "Undefined index" Notices
417
* Removed 404 link from Important Notice panel
418
* Updated Google links in the Overview panel