GA Google Analytics - Version 20180816

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

Code changes from version 20180506 to 20180816

ga-google-analytics.php CHANGED
@@ -6,12 +6,12 @@
6
  Tags: analytics, ga, google, google analytics, tracking, statistics, stats
7
  Author: Jeff Starr
8
  Author URI: https://plugin-planet.com/
9
- Donate link: https://m0n.co/donate
10
  Contributors: specialk
11
  Requires at least: 4.1
12
  Tested up to: 5.0
13
- Stable tag: 20180506
14
- Version: 20180506
15
  Requires PHP: 5.2
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', '20180506');
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'));
@@ -140,7 +140,7 @@ if (!class_exists('GA_Google_Analytics')) {
140
  $rate_title = esc_attr__('Click here to rate and review this plugin on WordPress.org', 'ga-google-analytics');
141
  $rate_text = esc_html__('Rate this plugin', 'ga-google-analytics') .' »';
142
 
143
- $links[] = '<a target="_blank" href="'. $rate_href .'" title="'. $rate_title .'">'. $rate_text .'</a>';
144
 
145
  }
146
 
@@ -360,9 +360,9 @@ if (!class_exists('GA_Google_Analytics')) {
360
  $url2 = 'https://developers.google.com/analytics/devguides/collection/gtagjs/';
361
  $url3 = 'https://developers.google.com/analytics/devguides/collection/gajs/';
362
 
363
- $link1 = '<a target="_blank" href="'. $url1 .'">'. esc_html__('Universal Analytics', 'ga-google-analytics') .'</a> ';
364
- $link2 = '<a target="_blank" href="'. $url2 .'">'. esc_html__('Global Site Tag', 'ga-google-analytics') .'</a> ';
365
- $link3 = '<a target="_blank" href="'. $url3 .'">'. esc_html__('Legacy', 'ga-google-analytics') .'</a> ';
366
 
367
  return array(
368
 
@@ -447,7 +447,7 @@ if (!class_exists('GA_Google_Analytics')) {
447
 
448
  }
449
 
450
- $GA_Google_Analytics = new GA_Google_Analytics();
451
 
452
  ga_google_analytics_init($GA_Google_Analytics);
453
 
6
  Tags: analytics, ga, google, google analytics, tracking, statistics, stats
7
  Author: Jeff Starr
8
  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.0
13
+ Stable tag: 20180816
14
+ Version: 20180816
15
  Requires PHP: 5.2
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
60
 
61
  function constants() {
62
 
63
+ if (!defined('GAP_VERSION')) define('GAP_VERSION', '20180816');
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'));
140
  $rate_title = esc_attr__('Click here to rate and review this plugin on WordPress.org', 'ga-google-analytics');
141
  $rate_text = esc_html__('Rate this plugin', 'ga-google-analytics') .'&nbsp;&raquo;';
142
 
143
+ $links[] = '<a target="_blank" rel="noopener noreferrer" href="'. $rate_href .'" title="'. $rate_title .'">'. $rate_text .'</a>';
144
 
145
  }
146
 
360
  $url2 = 'https://developers.google.com/analytics/devguides/collection/gtagjs/';
361
  $url3 = 'https://developers.google.com/analytics/devguides/collection/gajs/';
362
 
363
+ $link1 = '<a target="_blank" rel="noopener noreferrer" href="'. $url1 .'">'. esc_html__('Universal Analytics', 'ga-google-analytics') .'</a> ';
364
+ $link2 = '<a target="_blank" rel="noopener noreferrer" href="'. $url2 .'">'. esc_html__('Global Site Tag', 'ga-google-analytics') .'</a> ';
365
+ $link3 = '<a target="_blank" rel="noopener noreferrer" href="'. $url3 .'">'. esc_html__('Legacy', 'ga-google-analytics') .'</a> ';
366
 
367
  return array(
368
 
447
 
448
  }
449
 
450
+ $GLOBALS['GA_Google_Analytics'] = $GA_Google_Analytics = new GA_Google_Analytics();
451
 
452
  ga_google_analytics_init($GA_Google_Analytics);
453
 
inc/plugin-core.php CHANGED
@@ -32,7 +32,13 @@ function ga_google_analytics_tracking_code() {
32
 
33
  extract(ga_google_analytics_options());
34
 
35
- if (empty($tracking_id)) return;
 
 
 
 
 
 
36
 
37
  if (empty($tracking_method)) return;
38
 
32
 
33
  extract(ga_google_analytics_options());
34
 
35
+ if (empty($tracking_id)) {
36
+
37
+ echo $custom;
38
+
39
+ return;
40
+
41
+ }
42
 
43
  if (empty($tracking_method)) return;
44
 
inc/settings-display.php CHANGED
@@ -29,12 +29,12 @@ if (!function_exists('add_action')) die(); ?>
29
  <ul>
30
  <li><a class="gap-toggle" data-target="usage" href="#gap-panel-usage"><?php esc_html_e('How to Use', 'ga-google-analytics'); ?></a></li>
31
  <li><a class="gap-toggle" data-target="settings" href="#gap-panel-settings"><?php esc_html_e('Plugin Settings', 'ga-google-analytics'); ?></a></li>
32
- <li><a target="_blank" href="https://wordpress.org/support/plugin/ga-google-analytics"><?php esc_html_e('Plugin Homepage', 'ga-google-analytics'); ?></a></li>
33
  </ul>
34
 
35
  <p>
36
  <?php esc_html_e('If you like this plugin, please', 'ga-google-analytics'); ?>
37
- <a target="_blank" href="https://wordpress.org/support/plugin/ga-google-analytics/reviews/?rate=5#new-post" title="<?php esc_attr_e('THANK YOU for your support!', 'ga-google-analytics'); ?>">
38
  <?php esc_html_e('give it a 5-star rating', 'ga-google-analytics'); ?>&nbsp;&raquo;
39
  </a>
40
  </p>
@@ -59,8 +59,8 @@ if (!function_exists('add_action')) die(); ?>
59
  <li><?php esc_html_e('Visit the "Plugin Settings" panel', 'ga-google-analytics'); ?></li>
60
  <li><?php esc_html_e('Enter your GA Tracking ID', 'ga-google-analytics'); ?></li>
61
  <li>
62
- <?php esc_html_e('Choose either', 'ga-google-analytics'); ?> <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/"><?php esc_html_e('Universal Analytics', 'ga-google-analytics'); ?></a>
63
- <?php esc_html_e('or', 'ga-google-analytics'); ?> <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/gtagjs/"><?php esc_html_e('Global Site Tag', 'ga-google-analytics'); ?></a>
64
  </li>
65
  <li><?php esc_html_e('Configure any other plugin settings as desired (optional)', 'ga-google-analytics'); ?></li>
66
  </ol>
@@ -70,9 +70,9 @@ if (!function_exists('add_action')) die(); ?>
70
  <div class="gap-caption">
71
 
72
  <?php esc_html_e('Note that it can take 24-48 hours after adding the tracking code before any analytical data appears in your', 'ga-google-analytics'); ?>
73
- <a target="_blank" href="https://www.google.com/analytics/"><?php esc_html_e('Google Analytics account', 'ga-google-analytics'); ?></a>.
74
  <?php esc_html_e('To check that the GA tacking code is included, look at the source code of your web page(s). Learn more at the', 'ga-google-analytics'); ?>
75
- <a target="_blank" href="https://support.google.com/analytics/?hl=en#topic=3544906"><?php esc_html_e('Google Analytics Help Center', 'ga-google-analytics'); ?></a>.
76
 
77
  </div>
78
 
@@ -109,7 +109,7 @@ if (!function_exists('add_action')) die(); ?>
109
  <td>
110
  <input id="gap_options[gap_display_ads]" name="gap_options[gap_display_ads]" type="checkbox" value="1" <?php if (isset($gap_options['gap_display_ads'])) checked('1', $gap_options['gap_display_ads']); ?>>
111
  <?php esc_html_e('Enable support for', 'ga-google-analytics'); ?>
112
- <a target="_blank" href="https://support.google.com/analytics/answer/2444872"><?php esc_html_e('Display Advertising', 'ga-google-analytics'); ?></a>
113
  </td>
114
  </tr>
115
  <tr>
@@ -117,7 +117,7 @@ if (!function_exists('add_action')) die(); ?>
117
  <td>
118
  <input id="gap_options[link_attr]" name="gap_options[link_attr]" type="checkbox" value="1" <?php if (isset($gap_options['link_attr'])) checked('1', $gap_options['link_attr']); ?>>
119
  <?php esc_html_e('Enable support for', 'ga-google-analytics'); ?>
120
- <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-link-attribution"><?php esc_html_e('Enhanced Link Attribution', 'ga-google-analytics'); ?></a>
121
  </td>
122
  </tr>
123
  <tr>
@@ -125,7 +125,7 @@ if (!function_exists('add_action')) die(); ?>
125
  <td>
126
  <input id="gap_options[gap_anonymize]" name="gap_options[gap_anonymize]" type="checkbox" value="1" <?php if (isset($gap_options['gap_anonymize'])) checked('1', $gap_options['gap_anonymize']); ?>>
127
  <?php esc_html_e('Enable support for', 'ga-google-analytics'); ?>
128
- <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization"><?php esc_html_e('IP Anonymization', 'ga-google-analytics'); ?></a>
129
  </td>
130
  </tr>
131
  <tr>
@@ -133,7 +133,7 @@ if (!function_exists('add_action')) die(); ?>
133
  <td>
134
  <input id="gap_options[gap_force_ssl]" name="gap_options[gap_force_ssl]" type="checkbox" value="1" <?php if (isset($gap_options['gap_force_ssl'])) checked('1', $gap_options['gap_force_ssl']); ?>>
135
  <?php esc_html_e('Enable support for', 'ga-google-analytics'); ?>
136
- <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL"><?php esc_html_e('Force SSL', 'ga-google-analytics'); ?></a>
137
  </td>
138
  </tr>
139
  </table>
@@ -142,7 +142,7 @@ if (!function_exists('add_action')) die(); ?>
142
 
143
  <table class="widefat">
144
  <tr>
145
- <th><label for="gap_options[gap_location]"><?php esc_html_e('Code Location', 'ga-google-analytics'); ?></label></th>
146
  <td>
147
  <?php echo $this->select_menu($this->options_locations(), 'gap_location'); ?>
148
  <div class="gap-caption">
@@ -159,7 +159,7 @@ if (!function_exists('add_action')) die(); ?>
159
  <?php esc_html_e('Any code entered here will be added to', 'ga-google-analytics'); ?> <code>ga('create')</code>
160
  <?php esc_html_e('for Universal Analytics, or added to', 'ga-google-analytics'); ?> <code>gtag('config')</code>
161
  <?php esc_html_e('for Global Site Tag.', 'ga-google-analytics'); ?>
162
- <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers"><?php esc_html_e('Learn more about creating trackers', 'ga-google-analytics'); ?></a>.
163
  </div>
164
  </td>
165
  </tr>
@@ -169,14 +169,14 @@ if (!function_exists('add_action')) die(); ?>
169
  <textarea id="gap_options[gap_custom_code]" name="gap_options[gap_custom_code]" type="textarea" rows="4" cols="70"><?php if (isset($gap_options['gap_custom_code'])) echo esc_textarea($gap_options['gap_custom_code']); ?></textarea>
170
  <div class="gap-caption">
171
  <?php esc_html_e('Any code entered here will be added to the GA code snippet. This is useful for things like', 'ga-google-analytics'); ?>
172
- <a target="_blank" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_with_multiple_trackers"><?php esc_html_e('creating multiple trackers', 'ga-google-analytics'); ?></a>
173
- <?php esc_html_e('and', 'ga-google-analytics'); ?> <a target="_blank" href="https://support.google.com/360suite/optimize/"><?php esc_html_e('Google Optimize', 'ga-google-analytics'); ?></a>.
174
  <?php esc_html_e('Can use', 'ga-google-analytics'); ?> <code>%%userid%%</code> <?php esc_html_e('to display the current user ID.', 'ga-google-analytics'); ?>
175
  </div>
176
  </td>
177
  </tr>
178
  <tr>
179
- <th><label for="gap_options[gap_custom]"><?php esc_html_e('Custom', 'ga-google-analytics'); ?> <code>&lt;head&gt;</code> <?php esc_html_e('Code', 'ga-google-analytics'); ?></label></th>
180
  <td>
181
  <textarea id="gap_options[gap_custom]" name="gap_options[gap_custom]" type="textarea" rows="4" cols="70"><?php if (isset($gap_options['gap_custom'])) echo esc_textarea($gap_options['gap_custom']); ?></textarea>
182
  <div class="gap-caption">
@@ -186,11 +186,11 @@ if (!function_exists('add_action')) die(); ?>
186
  </td>
187
  </tr>
188
  <tr>
189
- <th><label for="gap_options[gap_custom_loc]"><?php esc_html_e('Custom', 'ga-google-analytics'); ?> <code>&lt;head&gt;</code> <?php esc_html_e('Location', 'ga-google-analytics'); ?></label></th>
190
  <td>
191
  <input id="gap_options[gap_custom_loc]" name="gap_options[gap_custom_loc]" type="checkbox" value="1" <?php if (isset($gap_options['gap_custom_loc'])) checked('1', $gap_options['gap_custom_loc']); ?>>
192
- <?php esc_html_e('Display custom', 'ga-google-analytics'); ?> <code>&lt;head&gt;</code> <?php esc_html_e('code', 'ga-google-analytics'); ?> <em><?php esc_html_e('before', 'ga-google-analytics'); ?></em>
193
- <?php esc_html_e('GA tracking code. Leave unchecked to display', 'ga-google-analytics'); ?> <em><?php esc_html_e('after', 'ga-google-analytics'); ?></em> <?php esc_html_e('the tracking code.', 'ga-google-analytics'); ?>
194
  </td>
195
  </tr>
196
  <tr>
@@ -249,11 +249,11 @@ if (!function_exists('add_action')) die(); ?>
249
 
250
  <div class="gap-credit-info">
251
 
252
- <a target="_blank" href="<?php echo esc_url(GAP_HOME); ?>" title="<?php esc_attr_e('Plugin Homepage', 'ga-google-analytics'); ?>"><?php echo GAP_NAME; ?></a>
253
  <?php esc_attr_e('by', 'ga-google-analytics'); ?>
254
- <a target="_blank" href="https://twitter.com/perishable" title="<?php esc_attr_e('Jeff Starr on Twitter', 'ga-google-analytics'); ?>">Jeff Starr</a>
255
  <?php esc_attr_e('@', 'ga-google-analytics'); ?>
256
- <a target="_blank" href="https://monzillamedia.com/" title="<?php esc_attr_e('Obsessive Web Development', 'ga-google-analytics'); ?>">Monzilla Media</a>
257
 
258
  </div>
259
 
29
  <ul>
30
  <li><a class="gap-toggle" data-target="usage" href="#gap-panel-usage"><?php esc_html_e('How to Use', 'ga-google-analytics'); ?></a></li>
31
  <li><a class="gap-toggle" data-target="settings" href="#gap-panel-settings"><?php esc_html_e('Plugin Settings', 'ga-google-analytics'); ?></a></li>
32
+ <li><a target="_blank" rel="noopener noreferrer" href="https://wordpress.org/support/plugin/ga-google-analytics"><?php esc_html_e('Plugin Homepage', 'ga-google-analytics'); ?></a></li>
33
  </ul>
34
 
35
  <p>
36
  <?php esc_html_e('If you like this plugin, please', 'ga-google-analytics'); ?>
37
+ <a target="_blank" rel="noopener noreferrer" href="https://wordpress.org/support/plugin/ga-google-analytics/reviews/?rate=5#new-post" title="<?php esc_attr_e('THANK YOU for your support!', 'ga-google-analytics'); ?>">
38
  <?php esc_html_e('give it a 5-star rating', 'ga-google-analytics'); ?>&nbsp;&raquo;
39
  </a>
40
  </p>
59
  <li><?php esc_html_e('Visit the "Plugin Settings" panel', 'ga-google-analytics'); ?></li>
60
  <li><?php esc_html_e('Enter your GA Tracking ID', 'ga-google-analytics'); ?></li>
61
  <li>
62
+ <?php esc_html_e('Choose either', 'ga-google-analytics'); ?> <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/"><?php esc_html_e('Universal Analytics', 'ga-google-analytics'); ?></a>
63
+ <?php esc_html_e('or', 'ga-google-analytics'); ?> <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/gtagjs/"><?php esc_html_e('Global Site Tag', 'ga-google-analytics'); ?></a>
64
  </li>
65
  <li><?php esc_html_e('Configure any other plugin settings as desired (optional)', 'ga-google-analytics'); ?></li>
66
  </ol>
70
  <div class="gap-caption">
71
 
72
  <?php esc_html_e('Note that it can take 24-48 hours after adding the tracking code before any analytical data appears in your', 'ga-google-analytics'); ?>
73
+ <a target="_blank" rel="noopener noreferrer" href="https://www.google.com/analytics/"><?php esc_html_e('Google Analytics account', 'ga-google-analytics'); ?></a>.
74
  <?php esc_html_e('To check that the GA tacking code is included, look at the source code of your web page(s). Learn more at the', 'ga-google-analytics'); ?>
75
+ <a target="_blank" rel="noopener noreferrer" href="https://support.google.com/analytics/?hl=en#topic=3544906"><?php esc_html_e('Google Analytics Help Center', 'ga-google-analytics'); ?></a>.
76
 
77
  </div>
78
 
109
  <td>
110
  <input id="gap_options[gap_display_ads]" name="gap_options[gap_display_ads]" type="checkbox" value="1" <?php if (isset($gap_options['gap_display_ads'])) checked('1', $gap_options['gap_display_ads']); ?>>
111
  <?php esc_html_e('Enable support for', 'ga-google-analytics'); ?>
112
+ <a target="_blank" rel="noopener noreferrer" href="https://support.google.com/analytics/answer/2444872"><?php esc_html_e('Display Advertising', 'ga-google-analytics'); ?></a>
113
  </td>
114
  </tr>
115
  <tr>
117
  <td>
118
  <input id="gap_options[link_attr]" name="gap_options[link_attr]" type="checkbox" value="1" <?php if (isset($gap_options['link_attr'])) checked('1', $gap_options['link_attr']); ?>>
119
  <?php esc_html_e('Enable support for', 'ga-google-analytics'); ?>
120
+ <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-link-attribution"><?php esc_html_e('Enhanced Link Attribution', 'ga-google-analytics'); ?></a>
121
  </td>
122
  </tr>
123
  <tr>
125
  <td>
126
  <input id="gap_options[gap_anonymize]" name="gap_options[gap_anonymize]" type="checkbox" value="1" <?php if (isset($gap_options['gap_anonymize'])) checked('1', $gap_options['gap_anonymize']); ?>>
127
  <?php esc_html_e('Enable support for', 'ga-google-analytics'); ?>
128
+ <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization"><?php esc_html_e('IP Anonymization', 'ga-google-analytics'); ?></a>
129
  </td>
130
  </tr>
131
  <tr>
133
  <td>
134
  <input id="gap_options[gap_force_ssl]" name="gap_options[gap_force_ssl]" type="checkbox" value="1" <?php if (isset($gap_options['gap_force_ssl'])) checked('1', $gap_options['gap_force_ssl']); ?>>
135
  <?php esc_html_e('Enable support for', 'ga-google-analytics'); ?>
136
+ <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL"><?php esc_html_e('Force SSL', 'ga-google-analytics'); ?></a>
137
  </td>
138
  </tr>
139
  </table>
142
 
143
  <table class="widefat">
144
  <tr>
145
+ <th><label for="gap_options[gap_location]"><?php esc_html_e('Tracking Code Location', 'ga-google-analytics'); ?></label></th>
146
  <td>
147
  <?php echo $this->select_menu($this->options_locations(), 'gap_location'); ?>
148
  <div class="gap-caption">
159
  <?php esc_html_e('Any code entered here will be added to', 'ga-google-analytics'); ?> <code>ga('create')</code>
160
  <?php esc_html_e('for Universal Analytics, or added to', 'ga-google-analytics'); ?> <code>gtag('config')</code>
161
  <?php esc_html_e('for Global Site Tag.', 'ga-google-analytics'); ?>
162
+ <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers"><?php esc_html_e('Learn more about creating trackers', 'ga-google-analytics'); ?></a>.
163
  </div>
164
  </td>
165
  </tr>
169
  <textarea id="gap_options[gap_custom_code]" name="gap_options[gap_custom_code]" type="textarea" rows="4" cols="70"><?php if (isset($gap_options['gap_custom_code'])) echo esc_textarea($gap_options['gap_custom_code']); ?></textarea>
170
  <div class="gap-caption">
171
  <?php esc_html_e('Any code entered here will be added to the GA code snippet. This is useful for things like', 'ga-google-analytics'); ?>
172
+ <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_with_multiple_trackers"><?php esc_html_e('creating multiple trackers', 'ga-google-analytics'); ?></a>
173
+ <?php esc_html_e('and', 'ga-google-analytics'); ?> <a target="_blank" rel="noopener noreferrer" href="https://support.google.com/360suite/optimize/"><?php esc_html_e('Google Optimize', 'ga-google-analytics'); ?></a>.
174
  <?php esc_html_e('Can use', 'ga-google-analytics'); ?> <code>%%userid%%</code> <?php esc_html_e('to display the current user ID.', 'ga-google-analytics'); ?>
175
  </div>
176
  </td>
177
  </tr>
178
  <tr>
179
+ <th><label for="gap_options[gap_custom]"><?php esc_html_e('Custom Code', 'ga-google-analytics'); ?></label></th>
180
  <td>
181
  <textarea id="gap_options[gap_custom]" name="gap_options[gap_custom]" type="textarea" rows="4" cols="70"><?php if (isset($gap_options['gap_custom'])) echo esc_textarea($gap_options['gap_custom']); ?></textarea>
182
  <div class="gap-caption">
186
  </td>
187
  </tr>
188
  <tr>
189
+ <th><label for="gap_options[gap_custom_loc]"><?php esc_html_e('Custom Code Location', 'ga-google-analytics'); ?></label></th>
190
  <td>
191
  <input id="gap_options[gap_custom_loc]" name="gap_options[gap_custom_loc]" type="checkbox" value="1" <?php if (isset($gap_options['gap_custom_loc'])) checked('1', $gap_options['gap_custom_loc']); ?>>
192
+ <?php esc_html_e('Display Custom Code', 'ga-google-analytics'); ?> <em><?php esc_html_e('before', 'ga-google-analytics'); ?></em>
193
+ <?php esc_html_e('the GA tracking code. Leave unchecked to display', 'ga-google-analytics'); ?> <em><?php esc_html_e('after', 'ga-google-analytics'); ?></em> <?php esc_html_e('the tracking code.', 'ga-google-analytics'); ?>
194
  </td>
195
  </tr>
196
  <tr>
249
 
250
  <div class="gap-credit-info">
251
 
252
+ <a target="_blank" rel="noopener noreferrer" href="<?php echo esc_url(GAP_HOME); ?>" title="<?php esc_attr_e('Plugin Homepage', 'ga-google-analytics'); ?>"><?php echo GAP_NAME; ?></a>
253
  <?php esc_attr_e('by', 'ga-google-analytics'); ?>
254
+ <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/perishable" title="<?php esc_attr_e('Jeff Starr on Twitter', 'ga-google-analytics'); ?>">Jeff Starr</a>
255
  <?php esc_attr_e('@', 'ga-google-analytics'); ?>
256
+ <a target="_blank" rel="noopener noreferrer" href="https://monzillamedia.com/" title="<?php esc_attr_e('Obsessive Web Development', 'ga-google-analytics'); ?>">Monzilla Media</a>
257
 
258
  </div>
259
 
inc/support-panel.php CHANGED
@@ -8,32 +8,32 @@ $plugin_url = esc_url(GAP_URL);
8
 
9
  $array = array(
10
 
11
- 0 => '<a target="_blank" href="https://plugin-planet.com/bbq-pro/" title="Premium WP Plugin: BBQ Pro">
12
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-bbq-pro.jpg" alt="BBQ Pro - Block Bad Queries" />
13
  </a>',
14
- 1 => '<a target="_blank" href="https://plugin-planet.com/banhammer-pro/" title="Premium WP Plugin: Banhammer Pro">
15
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-banhammer-pro.jpg" alt="Banhammer Pro - Drop the hammer." />
16
  </a>',
17
- 2 => '<a target="_blank" href="https://plugin-planet.com/blackhole-pro/" title="Premium WP Plugin: Blackhole Pro">
18
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-blackhole-pro.jpg" alt="Blackhole Pro - Block Bad Bots" />
19
  </a>',
20
- 3 => '<a target="_blank" href="https://plugin-planet.com/ses-pro/" title="Premium WP Plugin: SES Pro">
21
- <img width="125" height="125" src="'. $plugin_url .'img/250x250-ses-pro.jpg" alt="SES Pro - Ajax-Powered Email Signup Forms" />
22
  </a>',
23
- 4 => '<a target="_blank" href="https://plugin-planet.com/usp-pro/" title="Premium WP Plugin: USP Pro">
24
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-usp-pro.jpg" alt="USP Pro - Unlimited Front-End Forms" />
25
  </a>',
26
 
27
- 5 => '<a target="_blank" href="https://digwp.com/" title="Take your WordPress Skills to the Next Level">
28
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-digging-into-wordpress.jpg" alt="Digging Into WordPress" />
29
  </a>',
30
- 6 => '<a target="_blank" href="https://wp-tao.com/" title="Learn the Way of WordPress">
31
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-tao-of-wordpress.jpg" alt="The Tao of WordPress" />
32
  </a>',
33
- 7 => '<a target="_blank" href="https://wp-tao.com/wordpress-themes-book/" title="WordPress Themes In Depth">
34
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-wp-themes-in-depth.jpg" alt="WordPress Themes In Depth" />
35
  </a>',
36
- 8 => '<a target="_blank" href="https://htaccessbook.com/" title="Optimize and Secure with .htaccess">
37
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-htaccess-made-easy.jpg" alt=".htaccess made easy" />
38
  </a>',
39
 
@@ -47,15 +47,15 @@ $item3 = isset($array[$items[2]]) ? $array[$items[2]] : 2;
47
 
48
  $url1 = esc_url('https://wp-tao.com/store/');
49
  $url2 = esc_url('https://plugin-planet.com/store/');
50
- $url3 = esc_url('https://m0n.co/donate');
51
 
52
  $title1 = esc_html__('Perishable Press Books', 'ga-google-analytics');
53
  $title2 = esc_html__('Plugin Planet', 'ga-google-analytics');
54
  $title3 = esc_html__('Donate via PayPal', 'ga-google-analytics');
55
 
56
- $link1 = ' <a target="_blank" href="'. $url1 .'" title="'. $title1 .'">'. esc_html__('books', 'ga-google-analytics') .'</a> ';
57
- $link2 = ' <a target="_blank" href="'. $url2 .'" title="'. $title2 .'">'. esc_html__('plugins', 'ga-google-analytics') .'</a>, ';
58
- $link3 = ' <a target="_blank" href="'. $url3 .'" title="'. $title3 .'">'. esc_html__('donation', 'ga-google-analytics') .'</a>. ';
59
 
60
  $message = esc_html__('Thank you for using', 'ga-google-analytics') .' '. $plugin_project .'! ';
61
  $message .= esc_html__('Please show support by purchasing one of my', 'ga-google-analytics') . $link1;
@@ -105,8 +105,7 @@ $donate = esc_html__('Any size donation helps me to continue developing this fre
105
  <p><strong>Please Donate</strong></p>
106
  <p><?php echo $donate; ?></p>
107
  <ul>
108
- <li><a target="_blank" href="https://m0n.co/donate">Donate via PayPal &raquo;</a></li>
109
- <li><a target="_blank" href="https://m0n.co/bitcoin">Donate via Bitcoin &raquo;</a></li>
110
  </ul>
111
  </div>
112
  </div>
8
 
9
  $array = array(
10
 
11
+ 0 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/bbq-pro/" title="Premium WP Plugin: BBQ Pro">
12
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-bbq-pro.jpg" alt="BBQ Pro - Block Bad Queries" />
13
  </a>',
14
+ 1 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/banhammer-pro/" title="Premium WP Plugin: Banhammer Pro">
15
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-banhammer-pro.jpg" alt="Banhammer Pro - Drop the hammer." />
16
  </a>',
17
+ 2 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/blackhole-pro/" title="Premium WP Plugin: Blackhole Pro">
18
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-blackhole-pro.jpg" alt="Blackhole Pro - Block Bad Bots" />
19
  </a>',
20
+ 3 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/ses-pro/" title="Premium WP Plugin: SES Pro">
21
+ <img width="125" rel="noopener noreferrer" height="125" src="'. $plugin_url .'img/250x250-ses-pro.jpg" alt="SES Pro - Ajax-Powered Email Signup Forms" />
22
  </a>',
23
+ 4 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/" title="Premium WP Plugin: USP Pro">
24
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-usp-pro.jpg" alt="USP Pro - Unlimited Front-End Forms" />
25
  </a>',
26
 
27
+ 5 => '<a target="_blank" rel="noopener noreferrer" href="https://digwp.com/" title="Take your WordPress Skills to the Next Level">
28
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-digging-into-wordpress.jpg" alt="Digging Into WordPress" />
29
  </a>',
30
+ 6 => '<a target="_blank" rel="noopener noreferrer" href="https://wp-tao.com/" title="Learn the Way of WordPress">
31
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-tao-of-wordpress.jpg" alt="The Tao of WordPress" />
32
  </a>',
33
+ 7 => '<a target="_blank" rel="noopener noreferrer" href="https://wp-tao.com/wordpress-themes-book/" title="WordPress Themes In Depth">
34
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-wp-themes-in-depth.jpg" alt="WordPress Themes In Depth" />
35
  </a>',
36
+ 8 => '<a target="_blank" rel="noopener noreferrer" href="https://htaccessbook.com/" title="Optimize and Secure with .htaccess">
37
  <img width="125" height="125" src="'. $plugin_url .'img/250x250-htaccess-made-easy.jpg" alt=".htaccess made easy" />
38
  </a>',
39
 
47
 
48
  $url1 = esc_url('https://wp-tao.com/store/');
49
  $url2 = esc_url('https://plugin-planet.com/store/');
50
+ $url3 = esc_url('https://monzillamedia.com/donate.html');
51
 
52
  $title1 = esc_html__('Perishable Press Books', 'ga-google-analytics');
53
  $title2 = esc_html__('Plugin Planet', 'ga-google-analytics');
54
  $title3 = esc_html__('Donate via PayPal', 'ga-google-analytics');
55
 
56
+ $link1 = ' <a target="_blank" rel="noopener noreferrer" href="'. $url1 .'" title="'. $title1 .'">'. esc_html__('books', 'ga-google-analytics') .'</a> ';
57
+ $link2 = ' <a target="_blank" rel="noopener noreferrer" href="'. $url2 .'" title="'. $title2 .'">'. esc_html__('plugins', 'ga-google-analytics') .'</a>, ';
58
+ $link3 = ' <a target="_blank" rel="noopener noreferrer" href="'. $url3 .'" title="'. $title3 .'">'. esc_html__('donation', 'ga-google-analytics') .'</a>. ';
59
 
60
  $message = esc_html__('Thank you for using', 'ga-google-analytics') .' '. $plugin_project .'! ';
61
  $message .= esc_html__('Please show support by purchasing one of my', 'ga-google-analytics') . $link1;
105
  <p><strong>Please Donate</strong></p>
106
  <p><?php echo $donate; ?></p>
107
  <ul>
108
+ <li><a target="_blank" rel="noopener noreferrer" href="https://monzillamedia.com/donate.html">Make a donation&nbsp;&raquo;</a></li>
 
109
  </ul>
110
  </div>
111
  </div>
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: 2018-03-06 02:41+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"
@@ -233,7 +233,7 @@ msgid "Force SSL"
233
  msgstr ""
234
 
235
  #: inc/settings-display.php:145
236
- msgid "Code Location"
237
  msgstr ""
238
 
239
  #: inc/settings-display.php:149
@@ -296,12 +296,8 @@ msgstr ""
296
  msgid "to display the current user ID."
297
  msgstr ""
298
 
299
- #: inc/settings-display.php:179 inc/settings-display.php:189
300
- msgid "Custom"
301
- msgstr ""
302
-
303
  #: inc/settings-display.php:179
304
- msgid "Code"
305
  msgstr ""
306
 
307
  #: inc/settings-display.php:183
@@ -315,15 +311,11 @@ msgid ""
315
  msgstr ""
316
 
317
  #: inc/settings-display.php:189
318
- msgid "Location"
319
- msgstr ""
320
-
321
- #: inc/settings-display.php:192
322
- msgid "Display custom"
323
  msgstr ""
324
 
325
  #: inc/settings-display.php:192
326
- msgid "code"
327
  msgstr ""
328
 
329
  #: inc/settings-display.php:192
@@ -331,7 +323,7 @@ msgid "before"
331
  msgstr ""
332
 
333
  #: inc/settings-display.php:193
334
- msgid "GA tracking code. Leave unchecked to display"
335
  msgstr ""
336
 
337
  #: inc/settings-display.php:193
3
  msgstr ""
4
  "Project-Id-Version: GA Google Analytics\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2018-08-17 21:47+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"
233
  msgstr ""
234
 
235
  #: inc/settings-display.php:145
236
+ msgid "Tracking Code Location"
237
  msgstr ""
238
 
239
  #: inc/settings-display.php:149
296
  msgid "to display the current user ID."
297
  msgstr ""
298
 
 
 
 
 
299
  #: inc/settings-display.php:179
300
+ msgid "Custom Code"
301
  msgstr ""
302
 
303
  #: inc/settings-display.php:183
311
  msgstr ""
312
 
313
  #: inc/settings-display.php:189
314
+ msgid "Custom Code Location"
 
 
 
 
315
  msgstr ""
316
 
317
  #: inc/settings-display.php:192
318
+ msgid "Display Custom Code"
319
  msgstr ""
320
 
321
  #: inc/settings-display.php:192
323
  msgstr ""
324
 
325
  #: inc/settings-display.php:193
326
+ msgid "the GA tracking code. Leave unchecked to display"
327
  msgstr ""
328
 
329
  #: inc/settings-display.php:193
readme.txt CHANGED
@@ -6,12 +6,12 @@ Description: Adds your Google Analytics Tracking Code to your WordPress site.
6
  Tags: analytics, ga, google, google analytics, tracking, statistics, stats
7
  Author: Jeff Starr
8
  Author URI: https://plugin-planet.com/
9
- Donate link: https://m0n.co/donate
10
  Contributors: specialk
11
  Requires at least: 4.1
12
  Tested up to: 5.0
13
- Stable tag: 20180506
14
- Version: 20180506
15
  Requires PHP: 5.2
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
@@ -23,8 +23,8 @@ Adds your Google Analytics Tracking Code to your WordPress site.
23
 
24
  == Description ==
25
 
26
- > Supports Global Site Tag / gtag.js !
27
- > Works perfectly with or without Gutenberg
28
 
29
  This plugin enables Google Analytics for your entire WordPress site. Lightweight and fast with plenty of great features.
30
 
@@ -60,10 +60,14 @@ This is a lightweight plugin that inserts the required GA tracking code. To view
60
  * Supports [Tracker Objects](https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers)
61
  * Supports [Google Optimize](https://support.google.com/360suite/optimize/)
62
 
63
- GDPR Notice: This plugin is 100% compliant with GDPR because it does not collect any user data. Even so, the tracking code added by this plugin is used by Google to collect all sorts of user data. So to ensure that your site is compliant with GDPR, please consult with Google and/or configure your Google account settings and/or tracking code as required by GDPR.
64
-
65
  Learn more about [Google Analytics](http://www.google.com/analytics/)!
66
 
 
 
 
 
 
 
67
 
68
 
69
  == Installation ==
@@ -124,7 +128,8 @@ GA Google Analytics cleans up after itself. All plugin settings will be removed
124
 
125
  == Screenshots ==
126
 
127
- 1. GA Google Analytics: Plugin Settings (panels toggle open/closed)
 
128
 
129
  More screenshots available at the [GA Plugin Homepage](https://perishablepress.com/google-analytics-plugin/).
130
 
@@ -182,7 +187,7 @@ To ask a question, suggest a feature, or provide feedback, [contact me directly]
182
 
183
  == Support development of this plugin ==
184
 
185
- I develop and maintain this free plugin with love for the WordPress community. To show support, you can [make a cash donation](https://m0n.co/donate), [bitcoin donation](https://m0n.co/bitcoin), or purchase one of my books:
186
 
187
  * [The Tao of WordPress](https://wp-tao.com/)
188
  * [Digging into WordPress](https://digwp.com/)
@@ -204,6 +209,17 @@ Links, tweets and likes also appreciated. Thanks! :)
204
 
205
  *Thank you to everyone who shares feedback for GA Google Analytics!*
206
 
 
 
 
 
 
 
 
 
 
 
 
207
  **20180506**
208
 
209
  * Bugfix: changes `anonymizeIP` to `anonymizeIp` for analytics.js
6
  Tags: analytics, ga, google, google analytics, tracking, statistics, stats
7
  Author: Jeff Starr
8
  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.0
13
+ Stable tag: 20180816
14
+ Version: 20180816
15
  Requires PHP: 5.2
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
23
 
24
  == Description ==
25
 
26
+ > Supports Global Site Tag / gtag.js
27
+ > GDPR compliant: does not collect any user data
28
 
29
  This plugin enables Google Analytics for your entire WordPress site. Lightweight and fast with plenty of great features.
30
 
60
  * Supports [Tracker Objects](https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers)
61
  * Supports [Google Optimize](https://support.google.com/360suite/optimize/)
62
 
 
 
63
  Learn more about [Google Analytics](http://www.google.com/analytics/)!
64
 
65
+ **GDPR**
66
+
67
+ This plugin does not collect any user data. Even so, the tracking code added by this plugin is used by Google to collect all sorts of user data. So this plugin does _not_ do anything to make your site _less_ compliant with GDPR. I have done my best to ensure that this plugin is 100% GDPR compliant, but I'm not a lawyer so can't guarantee anything. To ensure that your site is compliant with GDPR, please consult an attorney, and also check with Google and/or configure your Google account settings and/or tracking code as required by GDPR.
68
+
69
+ > Works perfectly with or without Gutenberg
70
+
71
 
72
 
73
  == Installation ==
128
 
129
  == Screenshots ==
130
 
131
+ 1. GA Google Analytics: Plugin Settings (default)
132
+ 2. GA Google Analytics: Plugin Settings (expanded)
133
 
134
  More screenshots available at the [GA Plugin Homepage](https://perishablepress.com/google-analytics-plugin/).
135
 
187
 
188
  == Support development of this plugin ==
189
 
190
+ I develop and maintain this free plugin with love for the WordPress community. To show support, you can [make a donation](https://monzillamedia.com/donate.html) or purchase one of my books:
191
 
192
  * [The Tao of WordPress](https://wp-tao.com/)
193
  * [Digging into WordPress](https://digwp.com/)
209
 
210
  *Thank you to everyone who shares feedback for GA Google Analytics!*
211
 
212
+ **20180816**
213
+
214
+ * Adds `rel="noopener noreferrer"` to all [blank-target links](https://perishablepress.com/wordpress-blank-target-vulnerability/)
215
+ * Updates GDPR blurb and donate link
216
+ * Improves support for WP-CLI ([details](https://wordpress.org/support/topic/php-fatal-error-in-wp-cli/))
217
+ * Refines some option descriptions on the settings page
218
+ * Enables display of Custom Code when tracking is disabled
219
+ * Updates plugin screenshots for WordPress Plugin Directory
220
+ * Regenerates default translation template
221
+ * Further tests on WP versions 4.9 and 5.0 (alpha)
222
+
223
  **20180506**
224
 
225
  * Bugfix: changes `anonymizeIP` to `anonymizeIp` for analytics.js