How to Install gtag.js on WordPress by Installing MonsterInsights

As a website owner, you need the support or integration of the gtag.js, also known as global site tag to streamline the tracking of Google products and their measurement, and it also enables users to remarket products. These functions can be performed when the Global site tag signals all your marketing tools. The technology behind this plugin is just like the Google Analytics script; therefore, it could be referred to as a replacement for the old tech. To install gtag.js on your WordPress site normally, may be quite challenging, however,  MonsterInsights has come to the rescue again. With the new MonsterInsights plugin for Global site tag support, you can easily integrate all the tracking, measuring and remarketing you need to present on your WordPress site, and monitor the behaviours of your WordPress site visitors, using the newly improved code system on Google Analytics.

monsterinsights announcement

Global site tag is quite new to the online market, so you may have several questions about its functions and properties. Here’s all you need to know about gtag.js;

 global tag code

The sole aim of the global site tag is to serve as an umbrella to all Google tags on your WordPress site and connect them with a single source. This leaves your site more organized, rather than clogging up. All you have to do is copy the code below and add it after the HTML on all pages of your website. The global site tag supports all products on Google, including; Firebase, Google Tag Manager, Google Analytics and Adwords amongst others.

If you are wondering why the Universal Analytics (analytics.js) is suddenly being replaced with the Global site tag and you want to compare their functions, here you go;

Installation functions 

The Universal Analytics enable users to install Google Analytics only, while the Global Site Tag enable users to install all Google products

Extra feature

The Global Site tag allows users to track conversion rates and remarket their products; however, Universal Analytics cannot perform this function.

The tracking function of gtag.js is much easier and reliable than Universal Analytics.

The Google Site Tag is integrated with three commands.

  • Event
  • Config


  • Set

gtag(‘set’, {
‘currency’: ‘EUR’,
‘country’: ‘NL’
gtag(‘config’, ‘<GA_TRACKING_ID_1>’);
gtag(‘config’, ‘<GA_TRACKING_ID_2>’);

To install the global site tag on your WordPress site, you need to install the new version of MonsterInsights Global site tag support.

If you have previously integrated any custom tracking code on your WordPress site (even if it’s not MonsterInsights), or you already configured the event tracking function on your WordPress site, MonsterInsights will instinctively detect the Analytics and offer you the option to switch to MonsterInsights Global site tag support. All you need to do is, connect MonsterInsights and turn on the option to “Use Global Site Tag (gtag.js)”

switch to gtag

If you are new to this setup, don’t worry, as we will guide you through simple steps to set up Event Tracking on your WordPress site using the MonsterInsights plugin, which will automatically connect you to MonsterInsights Global site tag support.  Follow the steps below, to integrate this plugin on your WordPress site;

  • Install the latest version of MonsterInsights on the WordPress site and connect to Google Analytics
  • To set up Event tracking on your WordPress site, you can simply add “custom link tracking” using MonsterInsights
  • Add the tag below to the HTML of your WordPress site’s link
  • When this is done, MonsterInsights will automatically sync with your site and provide detailed tracking reports
  • To view the report of your event tracking on Google Analytics using MonsterInsights, Navigate to the “Insights” menu
  • Select the “Reports” option
  • Click on “Publisher”
  • The report of the links or tags you have added to Event tracking will be shown.

In its next release, the MonsterInsights plugin is set to make the global site tag (gtag.js), the default tracking code, and will automatically update all users! For now, go to the MonsterInsights dashboard and switch to the global site tag from Analytics.js easily with MonsterInsights.


Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Pin It on Pinterest

Share This