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 | GA Google Analytics |
Version | 20201120 |
Comparing to | |
See all releases |
Code changes from version 20200815 to 20201120
- ga-google-analytics.php +5 -5
- inc/support-panel.php +1 -1
- readme.txt +75 -35
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.
|
13 |
-
Stable tag:
|
14 |
-
Version:
|
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', '
|
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'));
|
@@ -320,7 +320,7 @@ if (!class_exists('GA_Google_Analytics')) {
|
|
320 |
|
321 |
$input['gap_id'] = wp_filter_nohtml_kses($input['gap_id']);
|
322 |
|
323 |
-
if (preg_match("/^GTM-/i", $input['gap_id'])) {
|
324 |
|
325 |
$input['gap_id'] = '';
|
326 |
|
9 |
Donate link: https://monzillamedia.com/donate.html
|
10 |
Contributors: specialk
|
11 |
Requires at least: 4.1
|
12 |
+
Tested up to: 5.6
|
13 |
+
Stable tag: 20201120
|
14 |
+
Version: 20201120
|
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', '20201120');
|
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'));
|
320 |
|
321 |
$input['gap_id'] = wp_filter_nohtml_kses($input['gap_id']);
|
322 |
|
323 |
+
if (isset($input['gap_id']) && preg_match("/^GTM-/i", $input['gap_id'])) {
|
324 |
|
325 |
$input['gap_id'] = '';
|
326 |
|
inc/support-panel.php
CHANGED
@@ -48,7 +48,7 @@ $item1 = isset($array[$items[0]]) ? $array[$items[0]] : 0;
|
|
48 |
$item2 = isset($array[$items[1]]) ? $array[$items[1]] : 1;
|
49 |
$item3 = isset($array[$items[2]]) ? $array[$items[2]] : 2;
|
50 |
|
51 |
-
$url1 = esc_url('https://
|
52 |
$url2 = esc_url('https://plugin-planet.com/store/');
|
53 |
$url3 = esc_url('https://monzillamedia.com/donate.html');
|
54 |
|
48 |
$item2 = isset($array[$items[1]]) ? $array[$items[1]] : 1;
|
49 |
$item3 = isset($array[$items[2]]) ? $array[$items[2]] : 2;
|
50 |
|
51 |
+
$url1 = esc_url('https://books.perishablepress.com/');
|
52 |
$url2 = esc_url('https://plugin-planet.com/store/');
|
53 |
$url3 = esc_url('https://monzillamedia.com/donate.html');
|
54 |
|
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.
|
13 |
-
Stable tag:
|
14 |
-
Version:
|
15 |
Requires PHP: 5.6.20
|
16 |
Text Domain: ga-google-analytics
|
17 |
Domain Path: /languages
|
@@ -26,10 +26,42 @@ Adds your Google Analytics Tracking Code to your WordPress site.
|
|
26 |
> Connects Google Analytics to WordPress
|
27 |
> Supports Universal Analytics / analytics.js
|
28 |
> Supports Global Site Tag / gtag.js
|
|
|
29 |
|
30 |
This plugin enables Google Analytics for your entire WordPress site. Lightweight and fast with plenty of great features.
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
* Blazing fast performance
|
35 |
* Does one thing and does it well
|
@@ -48,25 +80,8 @@ This plugin enables Google Analytics for your entire WordPress site. Lightweight
|
|
48 |
|
49 |
This is a lightweight plugin that inserts the required GA tracking code. To view your site statistics, visit your Google Analytics account.
|
50 |
|
51 |
-
**GA Tracking Options**
|
52 |
|
53 |
-
|
54 |
-
* [Global Site Tag](https://developers.google.com/analytics/devguides/collection/gtagjs/) / gtag.js
|
55 |
-
* [Legacy](https://developers.google.com/analytics/devguides/collection/gajs/) / ga.js
|
56 |
-
|
57 |
-
**GA Feature Support**
|
58 |
-
|
59 |
-
* Supports [Display Advertising](https://support.google.com/analytics/answer/2444872)
|
60 |
-
* Supports [Enhanced Link Attribution](https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-link-attribution)
|
61 |
-
* Supports [IP Anonymization](https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization)
|
62 |
-
* Supports [Force SSL](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL)
|
63 |
-
* Supports [Tracker Objects](https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers)
|
64 |
-
* Supports [Google Optimize](https://support.google.com/optimize/answer/6262084)
|
65 |
-
* Supports [User Opt-Out](https://developers.google.com/analytics/devguides/collection/analyticsjs/user-opt-out)
|
66 |
-
|
67 |
-
Also supports tracking links and conversions via the Custom Code setting. Learn more about [Google Analytics](https://www.google.com/analytics/)!
|
68 |
-
|
69 |
-
**Pro Version**
|
70 |
|
71 |
[GA Google Analytics Pro](https://plugin-planet.com/ga-google-analytics-pro/) includes the same features as the free version, PLUS the following:
|
72 |
|
@@ -84,7 +99,8 @@ Also supports tracking links and conversions via the Custom Code setting. Learn
|
|
84 |
|
85 |
Learn more and get [GA Pro »](https://plugin-planet.com/ga-google-analytics-pro/)
|
86 |
|
87 |
-
|
|
|
88 |
|
89 |
__User Data:__ 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. You can learn more about Google Privacy [here](https://policies.google.com/privacy?hl=en-US).
|
90 |
|
@@ -96,7 +112,7 @@ __Services:__ This plugin does not connect to any third-party locations or servi
|
|
96 |
|
97 |
== Installation ==
|
98 |
|
99 |
-
|
100 |
|
101 |
1. Upload the plugin to your blog and activate
|
102 |
2. Visit the settings to configure your options
|
@@ -105,24 +121,28 @@ After configuring your settings, you can verify that GA tracking code is include
|
|
105 |
|
106 |
__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).
|
107 |
|
108 |
-
[More info on installing WP plugins](https://wordpress.org/support/article/managing-plugins/#installing-plugins)
|
109 |
|
110 |
|
111 |
-
|
112 |
|
113 |
To enable Google Analytics tracking on your site, follow these steps:
|
114 |
|
115 |
1. Visit the "Plugin Settings" panel
|
116 |
2. Enter your GA Tracking ID
|
117 |
-
3. Choose either [Universal Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/) or [Global Site Tag](https://developers.google.com/analytics/devguides/collection/gtagjs/)
|
118 |
4. Configure any other plugin settings as desired (optional)
|
119 |
|
120 |
Save changes and done. After 24-48 hours, you can log into your Google Analytics account to view your stats.
|
121 |
|
122 |
-
|
|
|
|
|
123 |
|
|
|
124 |
|
125 |
-
|
|
|
126 |
|
127 |
Google Analytics tracking methods change over time. First there was `urchin.js`, then `ga.js`, and now `analytics.js`, soon to be replaced officially by `gtag.js`. If you are using an older version and want to upgrade, check out these Google docs:
|
128 |
|
@@ -130,7 +150,7 @@ Google Analytics tracking methods change over time. First there was `urchin.js`,
|
|
130 |
* [Migrate from analytics.js to gtag.js](https://developers.google.com/analytics/devguides/collection/gtagjs/migration)
|
131 |
|
132 |
|
133 |
-
|
134 |
|
135 |
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.
|
136 |
|
@@ -139,22 +159,22 @@ __Note:__ uninstalling the plugin from the WP Plugins screen results in the remo
|
|
139 |
For more information, visit the [GA Plugin Homepage](https://perishablepress.com/google-analytics-plugin/).
|
140 |
|
141 |
|
142 |
-
|
143 |
|
144 |
To restore default plugin options, either uninstall/reinstall the plugin, or visit the plugin settings > Restore Default Options.
|
145 |
|
146 |
|
147 |
-
|
148 |
|
149 |
GA Google Analytics cleans up after itself. All plugin settings will be removed from your database when the plugin is uninstalled via the Plugins screen. Your collected GA data will remain in your Google account.
|
150 |
|
151 |
|
152 |
-
|
153 |
|
154 |
Want more control over your GA Tracking codes? With awesome features like Opt-Out Box and Code Previews? Check out [GA Pro »](https://plugin-planet.com/ga-google-analytics-pro/)
|
155 |
|
156 |
|
157 |
-
|
158 |
|
159 |
If you like GA Google Analytics, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/ga-google-analytics/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you!
|
160 |
|
@@ -181,6 +201,18 @@ For more information, visit the [GA Plugin Homepage](https://perishablepress.com
|
|
181 |
|
182 |
== Frequently Asked Questions ==
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
**Tracking code is not displayed in source code?**
|
185 |
|
186 |
If you check the source code of your pages and don't see the GA tracking code, check the following:
|
@@ -272,7 +304,7 @@ And/or purchase one of my premium WordPress plugins:
|
|
272 |
* [BBQ Pro](https://plugin-planet.com/bbq-pro/) - Super fast WordPress firewall
|
273 |
* [Blackhole Pro](https://plugin-planet.com/blackhole-pro/) - Automatically block bad bots
|
274 |
* [Banhammer Pro](https://plugin-planet.com/banhammer-pro/) - Monitor traffic and ban the bad guys
|
275 |
-
* [GA Google Analytics Pro](https://plugin-planet.com/ga-google-analytics-pro/) - Connect
|
276 |
* [USP Pro](https://plugin-planet.com/usp-pro/) - Unlimited front-end forms
|
277 |
|
278 |
Links, tweets and likes also appreciated. Thanks! :)
|
@@ -288,6 +320,14 @@ If you like GA Google Analytics, please take a moment to [give a 5-star rating](
|
|
288 |
> New Pro version available! Check out [GA Pro »](https://plugin-planet.com/ga-google-analytics-pro/)
|
289 |
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
**20200815**
|
292 |
|
293 |
* Adds short URL ID comment to source code
|
9 |
Donate link: https://monzillamedia.com/donate.html
|
10 |
Contributors: specialk
|
11 |
Requires at least: 4.1
|
12 |
+
Tested up to: 5.6
|
13 |
+
Stable tag: 20201120
|
14 |
+
Version: 20201120
|
15 |
Requires PHP: 5.6.20
|
16 |
Text Domain: ga-google-analytics
|
17 |
Domain Path: /languages
|
26 |
> Connects Google Analytics to WordPress
|
27 |
> Supports Universal Analytics / analytics.js
|
28 |
> Supports Global Site Tag / gtag.js
|
29 |
+
> Supports Google Analytics 4
|
30 |
|
31 |
This plugin enables Google Analytics for your entire WordPress site. Lightweight and fast with plenty of great features.
|
32 |
|
33 |
+
|
34 |
+
### GA Tracking Options ###
|
35 |
+
|
36 |
+
* [Universal Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/) / analytics.js
|
37 |
+
* [Global Site Tag](https://developers.google.com/analytics/devguides/collection/gtagjs/) / gtag.js
|
38 |
+
* [Legacy](https://developers.google.com/analytics/devguides/collection/gajs/) / ga.js
|
39 |
+
|
40 |
+
To enable __Google Analytics 4__:
|
41 |
+
|
42 |
+
1. Follow [this guide](https://support.google.com/analytics/answer/9306384) to create a GA 4 account
|
43 |
+
2. During account creation, you'll get a tracking (measurement) ID
|
44 |
+
3. Add your new tracking ID to the plugin setting, "GA Tracking ID"
|
45 |
+
4. Select "Global Site Tag" for the plugin setting, "Global Site Tag"
|
46 |
+
|
47 |
+
Save changes and done. Wait 24-48 hours before viewing collected data in your GA account.
|
48 |
+
|
49 |
+
|
50 |
+
### GA Feature Support ###
|
51 |
+
|
52 |
+
* Supports [Google Analytics 4](https://support.google.com/analytics/answer/9306384)
|
53 |
+
* Supports [Display Advertising](https://support.google.com/analytics/answer/2444872)
|
54 |
+
* Supports [Enhanced Link Attribution](https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-link-attribution)
|
55 |
+
* Supports [IP Anonymization](https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization)
|
56 |
+
* Supports [Force SSL](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL)
|
57 |
+
* Supports [Tracker Objects](https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers)
|
58 |
+
* Supports [Google Optimize](https://support.google.com/optimize/answer/6262084)
|
59 |
+
* Supports [User Opt-Out](https://developers.google.com/analytics/devguides/collection/analyticsjs/user-opt-out)
|
60 |
+
|
61 |
+
Also supports tracking links and conversions via the Custom Code setting. Learn more about [Google Analytics](https://www.google.com/analytics/)!
|
62 |
+
|
63 |
+
|
64 |
+
### Features ###
|
65 |
|
66 |
* Blazing fast performance
|
67 |
* Does one thing and does it well
|
80 |
|
81 |
This is a lightweight plugin that inserts the required GA tracking code. To view your site statistics, visit your Google Analytics account.
|
82 |
|
|
|
83 |
|
84 |
+
### Pro Version ###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
[GA Google Analytics Pro](https://plugin-planet.com/ga-google-analytics-pro/) includes the same features as the free version, PLUS the following:
|
87 |
|
99 |
|
100 |
Learn more and get [GA Pro »](https://plugin-planet.com/ga-google-analytics-pro/)
|
101 |
|
102 |
+
|
103 |
+
### Privacy ###
|
104 |
|
105 |
__User Data:__ 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. You can learn more about Google Privacy [here](https://policies.google.com/privacy?hl=en-US).
|
106 |
|
112 |
|
113 |
== Installation ==
|
114 |
|
115 |
+
### How to install the plugin ###
|
116 |
|
117 |
1. Upload the plugin to your blog and activate
|
118 |
2. Visit the settings to configure your options
|
121 |
|
122 |
__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).
|
123 |
|
124 |
+
[More info on installing WP plugins »](https://wordpress.org/support/article/managing-plugins/#installing-plugins)
|
125 |
|
126 |
|
127 |
+
### How to use the plugin ###
|
128 |
|
129 |
To enable Google Analytics tracking on your site, follow these steps:
|
130 |
|
131 |
1. Visit the "Plugin Settings" panel
|
132 |
2. Enter your GA Tracking ID
|
133 |
+
3. Choose either [Universal Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/) or [Global Site Tag](https://developers.google.com/analytics/devguides/collection/gtagjs/)*
|
134 |
4. Configure any other plugin settings as desired (optional)
|
135 |
|
136 |
Save changes and done. After 24-48 hours, you can log into your Google Analytics account to view your stats.
|
137 |
|
138 |
+
__Notes:__
|
139 |
+
|
140 |
+
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").
|
141 |
|
142 |
+
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).
|
143 |
|
144 |
+
|
145 |
+
### Upgrading Analytics ###
|
146 |
|
147 |
Google Analytics tracking methods change over time. First there was `urchin.js`, then `ga.js`, and now `analytics.js`, soon to be replaced officially by `gtag.js`. If you are using an older version and want to upgrade, check out these Google docs:
|
148 |
|
150 |
* [Migrate from analytics.js to gtag.js](https://developers.google.com/analytics/devguides/collection/gtagjs/migration)
|
151 |
|
152 |
|
153 |
+
### Plugin Upgrades ###
|
154 |
|
155 |
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.
|
156 |
|
159 |
For more information, visit the [GA Plugin Homepage](https://perishablepress.com/google-analytics-plugin/).
|
160 |
|
161 |
|
162 |
+
### Restore Default Options ###
|
163 |
|
164 |
To restore default plugin options, either uninstall/reinstall the plugin, or visit the plugin settings > Restore Default Options.
|
165 |
|
166 |
|
167 |
+
### Uninstalling ###
|
168 |
|
169 |
GA Google Analytics cleans up after itself. All plugin settings will be removed from your database when the plugin is uninstalled via the Plugins screen. Your collected GA data will remain in your Google account.
|
170 |
|
171 |
|
172 |
+
### Pro Version ###
|
173 |
|
174 |
Want more control over your GA Tracking codes? With awesome features like Opt-Out Box and Code Previews? Check out [GA Pro »](https://plugin-planet.com/ga-google-analytics-pro/)
|
175 |
|
176 |
|
177 |
+
### Like the plugin? ###
|
178 |
|
179 |
If you like GA Google Analytics, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/ga-google-analytics/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you!
|
180 |
|
201 |
|
202 |
== Frequently Asked Questions ==
|
203 |
|
204 |
+
**How to enable Google Analytics 4?**
|
205 |
+
|
206 |
+
To enable __Google Analytics 4__:
|
207 |
+
|
208 |
+
1. Follow [this guide](https://support.google.com/analytics/answer/9306384) to create a GA 4 account
|
209 |
+
2. During account creation, you'll get a tracking (measurement) ID
|
210 |
+
3. Add your new tracking ID to the plugin setting, "GA Tracking ID"
|
211 |
+
4. Select "Global Site Tag" for the plugin setting, "Global Site Tag"
|
212 |
+
|
213 |
+
Save changes and done. Wait 24-48 hours before viewing collected data in your GA account.
|
214 |
+
|
215 |
+
|
216 |
**Tracking code is not displayed in source code?**
|
217 |
|
218 |
If you check the source code of your pages and don't see the GA tracking code, check the following:
|
304 |
* [BBQ Pro](https://plugin-planet.com/bbq-pro/) - Super fast WordPress firewall
|
305 |
* [Blackhole Pro](https://plugin-planet.com/blackhole-pro/) - Automatically block bad bots
|
306 |
* [Banhammer Pro](https://plugin-planet.com/banhammer-pro/) - Monitor traffic and ban the bad guys
|
307 |
+
* [GA Google Analytics Pro](https://plugin-planet.com/ga-google-analytics-pro/) - Connect WordPress to Google Analytics
|
308 |
* [USP Pro](https://plugin-planet.com/usp-pro/) - Unlimited front-end forms
|
309 |
|
310 |
Links, tweets and likes also appreciated. Thanks! :)
|
320 |
> New Pro version available! Check out [GA Pro »](https://plugin-planet.com/ga-google-analytics-pro/)
|
321 |
|
322 |
|
323 |
+
**20201120**
|
324 |
+
|
325 |
+
* Supports Google Analytics 4
|
326 |
+
* Updates readme/docs with GA 4 infos
|
327 |
+
* Tweaks `validate_settings()`
|
328 |
+
* Tests on PHP 7.4 and 8.0
|
329 |
+
* Tests on WordPress 5.6
|
330 |
+
|
331 |
**20200815**
|
332 |
|
333 |
* Adds short URL ID comment to source code
|