This page contains affiliate links to products. We may receive a little commission for purchases made through these links at no extra cost for you.
Have you heard of Google’s new tracking code system (gtag.js)? If you have the old code installed and wonder how to move to the new tracking system, this is how: with the MonsterInsights plugin and the new MonsterInsights Global Site Tag support.
Not only will this allow you to move to the new Universal Analytics for Web (gtag.js), but it will also help your Google Analytics implementation become more accurate. With this post, we’ll show you how and give you some tips along the way to ensure success. Yep, it’s that quick and easy! Let’s get started.
What gtag.js is and why it’s important
For any brand new Google Analytics account, the gtag.js is the suggested tracking method. The global site tag works together with another piece of code: an event snippet when you track website conversions or a phone snippet when you track calls to your website. This replaces your business phone number with a Google forwarding number.
There are a few reasons why the global site tag is the recommended tracking method, and they’re not too difficult to understand. The gtag.js is used by Google Ads and supports multiple Google products such as Google Marketing Platform and Google Analytics. For that reason, gtag.js provides easier integration with other Google products and allows them to communicate more easily in sending data.
A better integration also means more accurate conversion tracking and complete coverage of all conversions, ensuring that all of your conversions are accounted for.
As you can easily understand, this new tracking code is essential, and Google will be using gtag.js more and more to create new analytics features in the future. Let’s find out now how to set up and use it.
How do I install gtag.js on my WordPress site?
Google’s new tracking code snippet, Global Site Tag (gtag.js), can be easily installed into your WordPress site. The most up-to-date WordPress themes often include a dedicated area in the dashboard to embed in the WordPress header the tracking code.
However, one of the easiest ways to install Google Analytics codes on your site is by using the MonsterInsights plugin. This tool allows you to view your website’s statistics directly within WordPress without having to leave your site. This way, everything is easily under control in a single dashboard.
Recently, MonsterInsights introduced support for the Global Site Tag (gtag.js), making it the default tracking code for all new users. This means that by installing the MonsterInsights plugin, even those using the older code will be able to switch from the old tracking code (analytics.js) to the Global Site Tag in a matter of a click.

For more information on implementing tracking codes and events with Google Analytics, click here.
If there are custom codes in your site or you have set up event tracking using another plugin, MonsterInsights will automatically detect analytics.js events and move them through the Global Site Tag (gtag.js).
MonsterInsights is considered the best WordPress analytics plugin, used every day by 2,000,000+ Professionals to grow their business. This new feature introduced by the MonsterInsights plugin certainly represents an interesting opportunity to speed up the transition between old and new codes. Moreover, it’s a perfect way to benefit from the improvements and future integrations accessible thanks to the gtag.js tracking code.
MonsterInsights pricing starts at $99.50 per year for the Plus plan. For more information click here