GA Google Analytics - Version 20200319

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 20200319
Comparing to
See all releases

Code changes from version 20191109 to 20200319

Files changed (3) hide show
  1. ga-google-analytics.php +5 -5
  2. inc/plugin-core.php +15 -2
  3. readme.txt +9 -3
ga-google-analytics.php CHANGED
@@ -9,9 +9,9 @@
9
  Donate link: https://monzillamedia.com/donate.html
10
  Contributors: specialk
11
  Requires at least: 4.1
12
- Tested up to: 5.3
13
- Stable tag: 20191109
14
- Version: 20191109
15
  Requires PHP: 5.6.20
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
@@ -32,7 +32,7 @@
32
  You should have received a copy of the GNU General Public License
33
  with this program. If not, visit: https://www.gnu.org/licenses/
34
 
35
- Copyright 2019 Monzilla Media. All rights reserved.
36
  */
37
 
38
  if (!defined('ABSPATH')) die();
@@ -60,7 +60,7 @@ if (!class_exists('GA_Google_Analytics')) {
60
 
61
  function constants() {
62
 
63
- if (!defined('GAP_VERSION')) define('GAP_VERSION', '20191109');
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'));
9
  Donate link: https://monzillamedia.com/donate.html
10
  Contributors: specialk
11
  Requires at least: 4.1
12
+ Tested up to: 5.4
13
+ Stable tag: 20200319
14
+ Version: 20200319
15
  Requires PHP: 5.6.20
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
32
  You should have received a copy of the GNU General Public License
33
  with this program. If not, visit: https://www.gnu.org/licenses/
34
 
35
+ Copyright 2020 Monzilla Media. All rights reserved.
36
  */
37
 
38
  if (!defined('ABSPATH')) die();
60
 
61
  function constants() {
62
 
63
+ if (!defined('GAP_VERSION')) define('GAP_VERSION', '20200319');
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
@@ -72,12 +72,18 @@ function ga_google_analytics_tracking_code() {
72
 
73
  }
74
 
 
 
 
 
75
  function ga_google_analytics_universal() {
76
 
77
  extract(ga_google_analytics_options());
78
 
79
  $custom_code = ga_google_analytics_custom_code($custom_code);
80
 
 
 
81
  $ga_display = "ga('require', 'displayfeatures');";
82
  $ga_link = "ga('require', 'linkid');";
83
  $ga_anon = "ga('set', 'anonymizeIp', true);";
@@ -90,7 +96,7 @@ 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
- ga('create', '<?php echo $tracking_id; ?>', 'auto'<?php if ($tracker_object) echo ', '. $tracker_object; ?>);
94
  <?php
95
  if ($custom_code) echo $custom_code . "\n\t\t\t";
96
  if ($display_ads) echo $ga_display . "\n\t\t\t";
@@ -104,6 +110,11 @@ function ga_google_analytics_universal() {
104
 
105
  }
106
 
 
 
 
 
 
107
  function ga_google_analytics_global() {
108
 
109
  extract(ga_google_analytics_options());
@@ -218,7 +229,7 @@ function ga_google_analytics_options() {
218
  // $options, $tracking_id, $location, $tracking_method, $universal, $display_ads, $link_attr, $anonymize,
219
  // $force_ssl, $admin_area, $disable_admin, $custom_location, $tracker_object, $custom_code, $custom
220
 
221
- return array(
222
 
223
  'options' => $options,
224
  'tracking_id' => $tracking_id,
@@ -237,4 +248,6 @@ function ga_google_analytics_options() {
237
  'custom' => $custom
238
  );
239
 
 
 
240
  }
72
 
73
  }
74
 
75
+
76
+
77
+
78
+
79
  function ga_google_analytics_universal() {
80
 
81
  extract(ga_google_analytics_options());
82
 
83
  $custom_code = ga_google_analytics_custom_code($custom_code);
84
 
85
+ $auto = apply_filters('ga_google_analytics_enable_auto', true) ? ', auto' : '';
86
+
87
  $ga_display = "ga('require', 'displayfeatures');";
88
  $ga_link = "ga('require', 'linkid');";
89
  $ga_anon = "ga('set', 'anonymizeIp', true);";
96
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
97
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
98
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
99
+ ga('create', '<?php echo $tracking_id; ?>'<?php echo $auto; if ($tracker_object) echo ', '. $tracker_object; ?>);
100
  <?php
101
  if ($custom_code) echo $custom_code . "\n\t\t\t";
102
  if ($display_ads) echo $ga_display . "\n\t\t\t";
110
 
111
  }
112
 
113
+
114
+
115
+
116
+
117
+
118
  function ga_google_analytics_global() {
119
 
120
  extract(ga_google_analytics_options());
229
  // $options, $tracking_id, $location, $tracking_method, $universal, $display_ads, $link_attr, $anonymize,
230
  // $force_ssl, $admin_area, $disable_admin, $custom_location, $tracker_object, $custom_code, $custom
231
 
232
+ $options_array = array(
233
 
234
  'options' => $options,
235
  'tracking_id' => $tracking_id,
248
  'custom' => $custom
249
  );
250
 
251
+ return apply_filters('ga_google_analytics_options_array', $options_array);
252
+
253
  }
readme.txt CHANGED
@@ -9,9 +9,9 @@ Author URI: https://plugin-planet.com/
9
  Donate link: https://monzillamedia.com/donate.html
10
  Contributors: specialk
11
  Requires at least: 4.1
12
- Tested up to: 5.3
13
- Stable tag: 20191109
14
- Version: 20191109
15
  Requires PHP: 5.6.20
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
@@ -265,6 +265,12 @@ If you like GA Google Analytics, please take a moment to [give a 5-star rating](
265
  > New Pro version available! Check out [GA Pro &raquo;](https://plugin-planet.com/ga-google-analytics-pro/)
266
 
267
 
 
 
 
 
 
 
268
  **20191109**
269
 
270
  * Tightens output/display of tracking code
9
  Donate link: https://monzillamedia.com/donate.html
10
  Contributors: specialk
11
  Requires at least: 4.1
12
+ Tested up to: 5.4
13
+ Stable tag: 20200319
14
+ Version: 20200319
15
  Requires PHP: 5.6.20
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
265
  > New Pro version available! Check out [GA Pro &raquo;](https://plugin-planet.com/ga-google-analytics-pro/)
266
 
267
 
268
+ **20200319**
269
+
270
+ * Adds filter hook `ga_google_analytics_options_array`
271
+ * Adds filter hook `ga_google_analytics_enable_auto`
272
+ * Tests on WordPress 5.4
273
+
274
  **20191109**
275
 
276
  * Tightens output/display of tracking code