Tips and Tricks Latest Post
Tips and Tricks Latest Post |
How to Add Google Analytics to WordPress Posted: 04 Apr 2017 10:36 PM PDT Adding Google Analytics to WordPress is a painless process. There are numerous ways to do it. Today, we will follow some simple steps to get it added. There is a plugin in the WordPress Plugin Repository that allows us to not only add the Google Analytics code, but load it in such a way that passes the Google PageSpeed Insights test. By default, the Google Analytic’s script has a low 2 hour cache time set, which ironically triggers a flag in Google PageSpeed Insights. The aforementioned plugin will let you add your Tracking ID, load the tracking code in the footer, and also load the script locally. Loading the script locally bypasses the 2 hour cache limitation, removing the flag set by Google’s Page Speed test. There is one caveat however, and that is that Google doesn’t support the local storage of the script. The reason Google does not prefer the local serving of the script, is because it can quickly become out of date when upgrades occur. However, the plugin that stores it, also leverages WP Cron to auto-update the script, so that concern becomes moot. In this tutorial, you will learn:
Resources mentioned in the tutorial:Before you move on:
How to add your site to Google Analytics.
Assuming you have already setup your web site within the Google Search Console, let’s move on to the next steps. How to connect Google Analytics with Google Search Console.
Now, with your Analytics Tracking ID handy, let’s go back to your WordPress Dashboard. If you haven’t yet copied the Tracking ID, you can click the Tracking Info, then Tracking Code link in the Analytics Dashboard to get it. How to add Google Analytics to WordPress.
To test placement, you can either:
|
You are subscribed to email updates from Tips and Tricks HQ. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments: