GA Google Analytics - Version 20221016

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

Code changes from version 20221008 to 20221016

css/settings.css CHANGED
@@ -38,15 +38,16 @@
38
  background-image: url(../img/ga-icon-160x160.png); background-repeat: no-repeat; background-position: 12px 14px; background-size: 20px 20px;
39
  }
40
 
 
41
  .wp-admin .wrap .gap-radio-inputs { margin: 7px 0; }
42
- .wp-admin .wrap .gap-radio-inputs .gap-note { color: #888; }
43
- .wp-admin .wrap .gap-radio-inputs .gap-code { color: #777; }
44
-
45
  .wp-admin .wrap .button-primary { margin: 0 0 15px 15px; }
46
 
47
- .wp-admin .wrap .gap-caption { line-height: 18px; font-size: 12px; padding: 5px 0 0 2px; opacity: 0.8; }
48
  .wp-admin .wrap .gap-caption code { line-height: 18px; font-size: 11px; padding: 2px 3px; margin: 0; }
49
- .wp-admin .wrap .gap-caption:hover { opacity: 0.9; }
 
 
 
50
 
51
  .wp-admin .gap-toggle-all { margin: 5px 0; }
52
  .wp-admin .gap-credit-info { margin: -5px 0 0 3px; }
38
  background-image: url(../img/ga-icon-160x160.png); background-repeat: no-repeat; background-position: 12px 14px; background-size: 20px 20px;
39
  }
40
 
41
+ .wp-admin .wrap textarea { display: block; }
42
  .wp-admin .wrap .gap-radio-inputs { margin: 7px 0; }
 
 
 
43
  .wp-admin .wrap .button-primary { margin: 0 0 15px 15px; }
44
 
45
+ .wp-admin .wrap .gap-caption { line-height: 18px; font-size: 12px; padding: 5px 0 0 2px; color: #777; }
46
  .wp-admin .wrap .gap-caption code { line-height: 18px; font-size: 11px; padding: 2px 3px; margin: 0; }
47
+ .wp-admin .wrap .toggle-link { margin: 0 2px; padding: 0 2px; }
48
+
49
+ .wp-admin .wrap .gap-note { color: #888; }
50
+ .wp-admin .wrap .gap-code { color: #777; background-color: #F7F7F7; padding: 1px 2px 2px 2px; border-radius: 1px; }
51
 
52
  .wp-admin .gap-toggle-all { margin: 5px 0; }
53
  .wp-admin .gap-credit-info { margin: -5px 0 0 3px; }
ga-google-analytics.php CHANGED
@@ -10,8 +10,8 @@
10
  Contributors: specialk
11
  Requires at least: 4.6
12
  Tested up to: 6.1
13
- Stable tag: 20221008
14
- Version: 20221008
15
  Requires PHP: 5.6.20
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
@@ -61,7 +61,7 @@ if (!class_exists('GA_Google_Analytics')) {
61
 
62
  function constants() {
63
 
64
- if (!defined('GAP_VERSION')) define('GAP_VERSION', '20221008');
65
  if (!defined('GAP_REQUIRE')) define('GAP_REQUIRE', '4.6');
66
  if (!defined('GAP_AUTHOR')) define('GAP_AUTHOR', 'Jeff Starr');
67
  if (!defined('GAP_NAME')) define('GAP_NAME', __('GA Google Analytics', 'ga-google-analytics'));
@@ -317,7 +317,7 @@ if (!class_exists('GA_Google_Analytics')) {
317
 
318
  'gap_id' => '',
319
  'gap_location' => 'header',
320
- 'gap_enable' => 1,
321
  'gap_display_ads' => 0,
322
  'link_attr' => 0,
323
  'gap_anonymize' => 0,
10
  Contributors: specialk
11
  Requires at least: 4.6
12
  Tested up to: 6.1
13
+ Stable tag: 20221016
14
+ Version: 20221016
15
  Requires PHP: 5.6.20
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
61
 
62
  function constants() {
63
 
64
+ if (!defined('GAP_VERSION')) define('GAP_VERSION', '20221016');
65
  if (!defined('GAP_REQUIRE')) define('GAP_REQUIRE', '4.6');
66
  if (!defined('GAP_AUTHOR')) define('GAP_AUTHOR', 'Jeff Starr');
67
  if (!defined('GAP_NAME')) define('GAP_NAME', __('GA Google Analytics', 'ga-google-analytics'));
317
 
318
  'gap_id' => '',
319
  'gap_location' => 'header',
320
+ 'gap_enable' => 2,
321
  'gap_display_ads' => 0,
322
  'link_attr' => 0,
323
  'gap_anonymize' => 0,
inc/settings-display.php CHANGED
@@ -80,7 +80,7 @@ if (!function_exists('add_action')) die(); ?>
80
 
81
  <ol>
82
  <li><?php esc_html_e('Visit the "Plugin Settings" panel', 'ga-google-analytics'); ?></li>
83
- <li><?php esc_html_e('Enter your Google Tracking ID (aka, Tag ID)', 'ga-google-analytics'); ?></li>
84
  <li>
85
  <?php esc_html_e('Choose either', 'ga-google-analytics'); ?>
86
  <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/gtagjs/"><?php esc_html_e('Google Tag', 'ga-google-analytics'); ?></a>
@@ -121,9 +121,9 @@ if (!function_exists('add_action')) die(); ?>
121
  <td>
122
  <input id="gap_options[gap_id]" name="gap_options[gap_id]" type="text" size="30" maxlength="30" value="<?php if (isset($gap_options['gap_id'])) echo esc_attr($gap_options['gap_id']); ?>">
123
  <div class="gap-caption">
124
- <?php esc_html_e('Enter your Google Tracking ID (aka, Tag ID).', 'ga-google-analytics'); ?>
125
  <a class="toggle-link" href="#more-info"><?php esc_html_e('Show info', 'ga-google-analytics'); ?></a>
126
- <span class="toggle-data"> : <?php esc_html_e('Supported formats include GT-XXXXXXXXX, G-XXXXXXXXX, and AW-XXXXXXXXX. Google Tag Manager (GTM-XXXXXXXXX) currently is not supported.', 'ga-google-analytics'); ?></span>
127
  </div>
128
  </td>
129
  </tr>
@@ -188,8 +188,8 @@ if (!function_exists('add_action')) die(); ?>
188
  <td>
189
  <textarea id="gap_options[tracker_object]" name="gap_options[tracker_object]" type="textarea" rows="4" cols="70"><?php if (isset($gap_options['tracker_object'])) echo esc_textarea($gap_options['tracker_object']); ?></textarea>
190
  <div class="gap-caption">
191
- <?php esc_html_e('Optional code added to', 'ga-google-analytics'); ?> <code>gtag('config')</code>
192
- <?php esc_html_e('for Google Tag, or added to', 'ga-google-analytics'); ?> <code>ga('create')</code>
193
  <?php esc_html_e('for Universal Analytics.', 'ga-google-analytics'); ?>
194
  </div>
195
  </td>
@@ -203,7 +203,7 @@ if (!function_exists('add_action')) die(); ?>
203
  <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('multiple trackers', 'ga-google-analytics'); ?></a>
204
  <?php esc_html_e('and', 'ga-google-analytics'); ?>
205
  <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/user-opt-out"><?php esc_html_e('user opt-out', 'ga-google-analytics'); ?></a>.
206
- <?php esc_html_e('Note: you can use', 'ga-google-analytics'); ?> <code>%%userid%%</code> <?php esc_html_e('and', 'ga-google-analytics'); ?> <code>%%username%%</code>
207
  <?php esc_html_e('to get the current user ID and login name.', 'ga-google-analytics'); ?>
208
  </div>
209
  </td>
@@ -213,7 +213,7 @@ if (!function_exists('add_action')) die(); ?>
213
  <td>
214
  <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>
215
  <div class="gap-caption">
216
- <?php esc_html_e('Optional markup added to', 'ga-google-analytics'); ?> <code>&lt;head&gt;</code>
217
  <?php esc_html_e('or footer, depending on the previous setting, Tracking Code Location.', 'ga-google-analytics'); ?>
218
  </div>
219
  </td>
80
 
81
  <ol>
82
  <li><?php esc_html_e('Visit the "Plugin Settings" panel', 'ga-google-analytics'); ?></li>
83
+ <li><?php esc_html_e('Enter your Google Tracking ID (aka, Tag ID, Measurement ID, Property ID)', 'ga-google-analytics'); ?></li>
84
  <li>
85
  <?php esc_html_e('Choose either', 'ga-google-analytics'); ?>
86
  <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/gtagjs/"><?php esc_html_e('Google Tag', 'ga-google-analytics'); ?></a>
121
  <td>
122
  <input id="gap_options[gap_id]" name="gap_options[gap_id]" type="text" size="30" maxlength="30" value="<?php if (isset($gap_options['gap_id'])) echo esc_attr($gap_options['gap_id']); ?>">
123
  <div class="gap-caption">
124
+ <?php esc_html_e('Enter your Google Tracking ID.', 'ga-google-analytics'); ?>
125
  <a class="toggle-link" href="#more-info"><?php esc_html_e('Show info', 'ga-google-analytics'); ?></a>
126
+ <span class="toggle-data"> <?php esc_html_e('Note: the Tracking ID also may be referred to as Tag ID, Measurement ID, or Property ID. Supported ID formats include AW-XXXXXXXXX, G-XXXXXXXXX, GT-XXXXXXXXX, and UA-XXXXXXXXX. Google Tag Manager (GTM-XXXXXXXXX) currently is not supported.', 'ga-google-analytics'); ?></span>
127
  </div>
128
  </td>
129
  </tr>
188
  <td>
189
  <textarea id="gap_options[tracker_object]" name="gap_options[tracker_object]" type="textarea" rows="4" cols="70"><?php if (isset($gap_options['tracker_object'])) echo esc_textarea($gap_options['tracker_object']); ?></textarea>
190
  <div class="gap-caption">
191
+ <?php esc_html_e('Optional code added to', 'ga-google-analytics'); ?> <span class="gap-code">gtag('config')</span>
192
+ <?php esc_html_e('for Google Tag, or added to', 'ga-google-analytics'); ?> <span class="gap-code">ga('create')</span>
193
  <?php esc_html_e('for Universal Analytics.', 'ga-google-analytics'); ?>
194
  </div>
195
  </td>
203
  <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('multiple trackers', 'ga-google-analytics'); ?></a>
204
  <?php esc_html_e('and', 'ga-google-analytics'); ?>
205
  <a target="_blank" rel="noopener noreferrer" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/user-opt-out"><?php esc_html_e('user opt-out', 'ga-google-analytics'); ?></a>.
206
+ <?php esc_html_e('Note: you can use', 'ga-google-analytics'); ?> <span class="gap-code">%%userid%%</span> <?php esc_html_e('and', 'ga-google-analytics'); ?> <span class="gap-code">%%username%%</span>
207
  <?php esc_html_e('to get the current user ID and login name.', 'ga-google-analytics'); ?>
208
  </div>
209
  </td>
213
  <td>
214
  <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>
215
  <div class="gap-caption">
216
+ <?php esc_html_e('Optional markup added to', 'ga-google-analytics'); ?> <span class="gap-code">&lt;head&gt;</span>
217
  <?php esc_html_e('or footer, depending on the previous setting, Tracking Code Location.', 'ga-google-analytics'); ?>
218
  </div>
219
  </td>
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: 2022-10-08 22:40+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"
@@ -183,11 +183,12 @@ msgid "Enhanced Link Attribution"
183
  msgstr ""
184
 
185
  #: inc/settings-display.php:83
186
- msgid "Enter your Google Tracking ID (aka, Tag ID)"
 
187
  msgstr ""
188
 
189
  #: inc/settings-display.php:124
190
- msgid "Enter your Google Tracking ID (aka, Tag ID)."
191
  msgstr ""
192
 
193
  #: ga-google-analytics.php:350
@@ -346,6 +347,14 @@ msgid ""
346
  "analytical data appears in your"
347
  msgstr ""
348
 
 
 
 
 
 
 
 
 
349
  #: inc/settings-display.php:206
350
  msgid "Note: you can use"
351
  msgstr ""
@@ -459,12 +468,6 @@ msgstr ""
459
  msgid "Show Support"
460
  msgstr ""
461
 
462
- #: inc/settings-display.php:126
463
- msgid ""
464
- "Supported formats include GT-XXXXXXXXX, G-XXXXXXXXX, and AW-XXXXXXXXX. "
465
- "Google Tag Manager (GTM-XXXXXXXXX) currently is not supported."
466
- msgstr ""
467
-
468
  #: inc/support-panel.php:57
469
  msgid "Thank you for using"
470
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: GA Google Analytics\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2022-10-17 22:04+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"
183
  msgstr ""
184
 
185
  #: inc/settings-display.php:83
186
+ msgid ""
187
+ "Enter your Google Tracking ID (aka, Tag ID, Measurement ID, Property ID)"
188
  msgstr ""
189
 
190
  #: inc/settings-display.php:124
191
+ msgid "Enter your Google Tracking ID."
192
  msgstr ""
193
 
194
  #: ga-google-analytics.php:350
347
  "analytical data appears in your"
348
  msgstr ""
349
 
350
+ #: inc/settings-display.php:126
351
+ msgid ""
352
+ "Note: the Tracking ID also may be referred to as Tag ID, Measurement ID, or "
353
+ "Property ID. Supported ID formats include AW-XXXXXXXXX, G-XXXXXXXXX, GT-"
354
+ "XXXXXXXXX, and UA-XXXXXXXXX. Google Tag Manager (GTM-XXXXXXXXX) currently is "
355
+ "not supported."
356
+ msgstr ""
357
+
358
  #: inc/settings-display.php:206
359
  msgid "Note: you can use"
360
  msgstr ""
468
  msgid "Show Support"
469
  msgstr ""
470
 
 
 
 
 
 
 
471
  #: inc/support-panel.php:57
472
  msgid "Thank you for using"
473
  msgstr ""
readme.txt CHANGED
@@ -10,8 +10,8 @@ Donate link: https://monzillamedia.com/donate.html
10
  Contributors: specialk
11
  Requires at least: 4.6
12
  Tested up to: 6.1
13
- Stable tag: 20221008
14
- Version: 20221008
15
  Requires PHP: 5.6.20
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
@@ -42,6 +42,8 @@ __Note:__ Google renamed "Global Site Tag" to "Google Tag".
42
 
43
  ### Enable Google Analytics 4 ###
44
 
 
 
45
  1. Follow [this guide](https://support.google.com/analytics/answer/9306384) to create a GA 4 account
46
  2. During account creation, you'll get a tracking (measurement) ID
47
  3. Add your new tracking ID to the plugin setting, "GA Tracking ID"
@@ -157,15 +159,18 @@ To enable Google Analytics tracking on your site, follow these steps:
157
 
158
  1. Visit the plugin settings
159
  2. Toggle open the "Plugin Settings" panel
160
- 3. In the first setting, "GA Tracking ID", enter your Tracking ID
161
- 4. In the next setting, "Tracking Method", choose either [Google Tag](https://developers.google.com/analytics/devguides/collection/gtagjs/) or [Universal Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/)*
162
  5. Configure any other plugin settings as desired (optional)
163
 
164
  Save changes and done. After 24-48 hours, you can log into your Google Analytics account to view your stats.
165
 
 
166
  __* Notes:__
167
 
168
- Google Tag (aka, Global Site Tag) is required for Google Analytics 4. For steps on setting up GA 4, check out the [plugin homepage](https://wordpress.org/plugins/ga-google-analytics/) (under "GA Tracking Options"). This information also is available at [Plugin Planet](https://plugin-planet.com/ga-pro-enable-google-analytics-4/).
 
 
169
 
170
  Also note that it can take 24-48 hours after adding the tracking code before any analytical data appears in your [Google Analytics account](https://developers.google.com/analytics/). To check that the GA tacking code is included, look at the source code of your web page(s). Learn more at the [Google Analytics Help Center](https://support.google.com/analytics/?hl=en#topic=3544906).
171
 
@@ -242,6 +247,11 @@ To enable __Google Analytics 4__:
242
  Save changes and done. Wait 24-48 hours before viewing collected data in your GA account.
243
 
244
 
 
 
 
 
 
245
  **Tracking code is not displayed in source code?**
246
 
247
  If you check the source code of your pages and don't see the GA tracking code, check the following:
@@ -334,6 +344,13 @@ If you like GA Google Analytics, please take a moment to [give a 5-star rating](
334
  > New Pro version available! Check out [GA Pro &raquo;](https://plugin-planet.com/ga-google-analytics-pro/)
335
 
336
 
 
 
 
 
 
 
 
337
  **20221008**
338
 
339
  * Adds [link/info](https://wordpress.org/support/topic/note-about-google-changes/) in plugin settings (Google deprecating Universal Analytics)
10
  Contributors: specialk
11
  Requires at least: 4.6
12
  Tested up to: 6.1
13
+ Stable tag: 20221016
14
+ Version: 20221016
15
  Requires PHP: 5.6.20
16
  Text Domain: ga-google-analytics
17
  Domain Path: /languages
42
 
43
  ### Enable Google Analytics 4 ###
44
 
45
+ Steps to enable Google Analytics 4:
46
+
47
  1. Follow [this guide](https://support.google.com/analytics/answer/9306384) to create a GA 4 account
48
  2. During account creation, you'll get a tracking (measurement) ID
49
  3. Add your new tracking ID to the plugin setting, "GA Tracking ID"
159
 
160
  1. Visit the plugin settings
161
  2. Toggle open the "Plugin Settings" panel
162
+ 3. In the first setting, "GA Tracking ID", enter your Tracking ID [1]
163
+ 4. In the next setting, "Tracking Method", choose either [Google Tag](https://developers.google.com/analytics/devguides/collection/gtagjs/) or [Universal Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/) [2]
164
  5. Configure any other plugin settings as desired (optional)
165
 
166
  Save changes and done. After 24-48 hours, you can log into your Google Analytics account to view your stats.
167
 
168
+
169
  __* Notes:__
170
 
171
+ [1] The "Tracking ID" also may be referred to as "Tag ID", "Measurement ID", or "Property ID", depending on various factors.
172
+
173
+ [2] Google Tag (aka, Global Site Tag) is required for Google Analytics 4. For steps on setting up GA 4, check out the [plugin homepage](https://wordpress.org/plugins/ga-google-analytics/) (under "GA Tracking Options"). This information also is available at [Plugin Planet](https://plugin-planet.com/ga-pro-enable-google-analytics-4/).
174
 
175
  Also note that it can take 24-48 hours after adding the tracking code before any analytical data appears in your [Google Analytics account](https://developers.google.com/analytics/). To check that the GA tacking code is included, look at the source code of your web page(s). Learn more at the [Google Analytics Help Center](https://support.google.com/analytics/?hl=en#topic=3544906).
176
 
247
  Save changes and done. Wait 24-48 hours before viewing collected data in your GA account.
248
 
249
 
250
+ **I am confused about all the different tracking methods?**
251
+
252
+ This article should help to get a better idea of the changes: [History of Google Analytics](https://onward.justia.com/history-of-google-analytics/)
253
+
254
+
255
  **Tracking code is not displayed in source code?**
256
 
257
  If you check the source code of your pages and don't see the GA tracking code, check the following:
344
  > New Pro version available! Check out [GA Pro &raquo;](https://plugin-planet.com/ga-google-analytics-pro/)
345
 
346
 
347
+ **20221016**
348
+
349
+ * Changes default tracking method to Google Tag
350
+ * Improves plugin settings page details
351
+ * Improves plugin documentation
352
+ * Updates translation template
353
+
354
  **20221008**
355
 
356
  * Adds [link/info](https://wordpress.org/support/topic/note-about-google-changes/) in plugin settings (Google deprecating Universal Analytics)