What is Global Site Tag (gtag.js)
So, you don’t need to add different code snippets to your website for each of the tools that you use from Google.
Why is it important
How to install Global Site Tag (gtag.js) in WordPress
There are multiple ways to set up Google Analytics Global Site Tag on your WordPress site. But, the easiest and simplest way to do that would be by using MonsterInsights. MonsterInsights is a simple yet powerful Google Analytics plugin for WordPress. It allows you to set up Google Analytics on your WordPress site from scratch and customize it to suit your needs.
From setting up scroll depth tracking on your website to tracking custom events and enabling enhanced eCommerce for WooCommerce, MonsterInsights can help you with everything related to Google Analytics and integrating it with WordPress.
If you haven’t got MonsterInsights installed and configured on your WordPress site yet, you can just install the latest version of the plugin from the WordPress plugin repository to take advantage of the latest code snippet. They’ve already done the heavy lifting for you. Just grab the latest version.
But, if you are an existing MonsterInsights user, you can switch to the latest Global Site Tag from within MonsterInsights Settings page.
By just turning on the above toggle, your code will automatically be migrated to the new Google Analytics Global Site Tag. If you have got any custom code or event running on your WordPress site, you needn’t worry about updating them. MonsterInsights will automatically detect those analytics.js events and pass them through the Global Site Tag (gtag.js). How simple!
But if you don’t mind waiting or if you feel that you don’t want to take the risk now, you can wait until they update the plugin to make use of Global Site Tag as the default option. Don’t worry though, this shouldn’t take long. Once the latest version is released, you’ll be able to use the new tracking snippet automatically and the above option will most probably be removed from the available option.
So, what are you waiting for? Go ahead and get MonsterInsights right away!
If you have got any doubts, you can check out my detailed MonsterInsights review. Or, just leave your question in the comments section below. I’d be happy to answer them for you.
P.S. If you don’t need all the features that MonsterInsights Pro offers, you can go with the Lite version. By the way, the Pro version comes with a 14 days money-back guarantee. 😉