Description
Connects Google Analytics to WordPress
Supports Universal Analytics / analytics.js
Supports Global Site Tag / gtag.js
Supports Google Analytics 4
GA Tracking Options
-
Google Tag / gtag.js -
Universal Analytics / analytics.js -
Legacy / ga.js
Enable Google Analytics 4
-
Follow this guide to create a GA 4 account -
During account creation, you’ll get a tracking (measurement) ID -
Add your new tracking ID to the plugin setting, “GA Tracking ID” -
Select “Google Tag” for the plugin setting, “Tracking Method”
GA Feature Support
-
Supports Google Analytics 4 -
Supports Display Advertising -
Supports Enhanced Link Attribution -
Supports IP Anonymization -
Supports Force SSL -
Supports Tracker Objects -
Supports Google Optimize -
Supports User Opt-Out
Features
-
Blazing fast performance -
Does one thing and does it well -
Drop-dead simple and easy to use -
Regularly updated and “future proof” -
Stays current with the latest tracking code -
Includes tracking code in header or footer -
Includes tracking code on all WordPress web pages -
Includes option to add your own custom markup -
Sleek plugin Settings page with toggling panels -
Option to disable tracking of admin-level users -
Option to enable page tracking in the Admin Area -
Works with or without Gutenberg Block Editor -
Easy to customize the tracking code -
More features available in the Pro version »
Pro Version
-
Visitor Opt-Out Box (frontend UI) -
Configure multiple tracking codes -
Live Preview of all tracking codes -
Choose location of multiple tracking codes -
Supports Custom Code in header or footer -
Disable tracking of all logged-in users -
Disable Tracking for any Post IDs, User Roles, Post Types -
Disable Tracking for Search Results and Post Archives -
Display Opt-Out Box automatically or via shortcode -
Complete Inline Help/Documentation -
Priority plugin help and support
Privacy
Support development
-
The Tao of WordPress -
Digging into WordPress -
.htaccess made easy -
WordPress Themes In Depth -
Wizard’s SQL Recipes for WordPress
-
BBQ Pro – Super fast WordPress firewall -
Blackhole Pro – Automatically block bad bots -
Banhammer Pro – Monitor traffic and ban the bad guys -
GA Google Analytics Pro – Connect WordPress to Google Analytics -
Simple Ajax Chat Pro – Unlimited chat rooms -
USP Pro – Unlimited front-end forms
スクリーンショット
インストール
How to install the plugin
-
Upload the plugin to your blog and activate -
Visit the settings to configure your options
How to use the plugin
-
Visit the plugin settings -
Toggle open the “Plugin Settings” panel -
In the first setting, “GA Tracking ID”, enter your Tracking ID [1] -
In the next setting, “Tracking Method”, choose either Google Tag or Universal Analytics [2] -
Configure any other plugin settings as desired (optional)
Upgrading Analytics
Plugin Upgrades
Restore Default Options
Uninstalling
Pro Version
Like the plugin?
FAQ
-
How to enable Google Analytics 4? -
To enable Google Analytics 4 : -
Follow this guide to create a GA 4 account -
During account creation, you’ll get a tracking (measurement) ID -
Add your new tracking ID to the plugin setting, “GA Tracking ID” -
Select “Google Tag” for the plugin setting, “Tracking Method”
Save changes and done. Wait 24-48 hours before viewing collected data in your GA account. -
-
I am confused about all the different tracking methods? -
This article should help to get a better idea of the changes: History of Google Analytics -
Tracking code is not displayed in source code? -
If you check the source code of your pages and don’t see the GA tracking code, check the following: -
Check that your theme includes the hooks, wp_head and wp_footer -
If you are using a caching plugin, try clearing the cache
If the GA tracking code still is not displayed, most likely there is interference from another plugin or theme. In this case, the best way to resolve the issue is to do some basic WordPress troubleshooting . -
-
Google Analytic says tracking code is not detected? -
You need to wait awhile for Google to collect some data, like at least a day or whatever. Standard stuff for Google Analytics. For more information, check out the Google Analytics Help Center . -
Can I filter the output of the “Custom GA Code” setting? -
Yes, you can use the gap_custom_code filter hook. -
How to implement Google Optimize? -
Here are the steps: -
Enable Universal Analytics in the plugin settings -
Add the Optimize plugin (e.g., ga('require', 'GTM-XXXXXX'); ) to the setting, “Custom GA Code” -
Add the Page Hiding (flicker) snippet to the setting, “Custom <head> Code” -
Enable the setting, “Custom <head> Location”
Done! You can view the source code of your web pages to verify the results. More info about Google Optimize . -
-
How to enable Opt-out of tracking? -
Here are the steps: -
Add the following code to the plugin setting, “Custom Code”: <script>window['ga-disable-UA-XXXXX-Y'] = true;</ script> -
Check the box to enable the setting, “Custom Code Location”.
Done! You can view the source code of your web pages to verify the results. More info about user opt-out . -
-
How to disable the “auto” parameter in ga(create)? -
By default the plugin includes the auto parameter in the tracking code: ga('create', 'GA-123456789000', 'auto'); However some tracking techniques (such as Site Speed Sample Rate) require replacing the auto parameter. To do it: First disable the auto parameter by adding the following code to WordPress functions or custom plugin : // GA Google Analytics - Disable auto parameter function ga_google_analytics_enable_auto($enable) { return false; } add_filter('ga_google_analytics_enable_auto', 'ga_google_analytics_enable_auto'); Now that auto is disabled, you can replace it with your own parameter(s). For example, to implement Universal Analytics Site Speed Sample Rate, enter the following code in the plugin setting “Custom Tracker Objects”: {'siteSpeedSampleRate': 100} Save changes and done. The resulting tracking code will now look like this: ga('create', 'GA-123456789000', {'siteSpeedSampleRate': 100}); So can adjust things as needed to add any parameters that are required. -
How to implement Anonymize? -
-
Add to “Custom Tracker Objects” setting: { 'anonymize_ip': true } -
Save changes and done.
-
-
Got a question? -
To ask a question, suggest a feature, or provide feedback, contact me directly . Learn more about Google Analytics and GA tracking methods .
Comments
Contributors
Open your interest?
Change and progress
New Pro version available! Check out GA Pro »
-
Updates plugin settings page -
Updates default translation template -
Improves plugin docs/readme.txt -
Tests on WordPress 6.5 (beta)