How to Quickly Install Google Analytics Global Site Tag in WordPress (gtag.js)

Do you want to add gtag.js to your WordPress website and looking for an easy solution? In this article will tell you the easy way how you can add gtag.js to your WordPress website by using a WordPress plugin called monster insights. 

For the uninitiated, gtag.js is a JavaScript framework that helps you to upload event data to Google Analytics, Google Advertising and the Google Marketing Platform. By adding this tracking code snippet, you can send events data to the Google marketing tools.

By analyzing the data about events, you get a better idea of how visitors interact with your website. E.g., How much percentage of your website they scrolled, which CTA button they clicked on.

What is gtag.js?

Google’s latest gtag is a JavaScript platform and an API that helps you to send event details to Google Analytics, Google Ads, and DoubleClick. This ensures that it is a code snippet that helps you quickly submit data to your Google marketing items. The gtag.js define the event data.

The “Global Site Tag” isn’t just another analytics library; it’s designed to make website tagging easier and more efficient across all Google products.

The gtag is aimed at websites that use Google Ads and Google Analytics. Google Tag Manager is another Google app that provides similar features. If you use Google Tag Manager as your tag management scheme, you won’t need to upgrade to gtag. However, if you don’t have either a Google Tag Manager or a gtag, here’s how you can determine which one is best for you.

How is it helpful to the website?

Google Analytics Plugin for WordPress is a free plugin to track the performance of your website. This simple to use and easy to implement Google analytic software provides many valuable features to optimize your website, increase your site traffic, and generate targeted leads and convert them into paying customers. Even better, this powerful Google Analytics Plugin for WordPress can be implemented without any special coding knowledge. Simply copy the code provided into your blog’s settings, and you are ready to begin monitoring your website’s performance. It also integrates seamlessly with your existing website tracking code. It works in a few simple steps. Once installed on your website, you will need to activate the Google Analytics code.

Gtag.js makes it much easier to process by keeping tags from different items in one place of code without creating additional accounts or changing settings on any separate interface. It also makes installation easier, speeds up product deployment, and allows us to send data to Google Tools and third-party applications.

It makes the process easy than google tag manager. It Encourages you to keep many of the Google items tags in one spot in your code. It is simplifying the installation to get you up and running for Google products earlier. Enable the opportunity to send data to several tools at once, rather than having separate tags.

How to install gtag.js in WordPress using Monsterinsights

Google Tag Manager is an application that allows everyone, even beginners, to enforce monitoring scripts on their websites easily without the need of even hiring a developer.

With that said, let’s go ahead and see how to set up Google Tag Manager in WordPress in the right way.

Step by step process for adding google tag manager to wordpress.

Step 1: Create Google tag manager account

First, go to the Google tag manager website and click on the “Start for free” button.

Next, you need to sign in with your Google account, and you can see the google tag manager dashboard where you have to create your account. Click on the “Create account” button to get started. 

Next, you have to create your account by entering your account name and choose a country in the account setup.

Now you have to fill the fields in container setup. It is a collection of tags and triggers and all configurations installed on a website. Enter the container name and choose where you want to use this container setup like web, IOS, Android and AMP.

Now you have to accept the terms and conditions of the google tag manager. Click the yes button on the top right of the screen.

Now you’ll see a new popup box appear on the screen with a code snippet to install google tag manager on your website.

You’ll see two code snippets for the head and body of the website. Copy the codes to paste them into respective fields in wordpress.

Step 2: Adding google tag manager code snippets to wordpress

Log in to the wordpress dashboard and install a plugin called Insert header and footers. To install it, go to plugins add new and search for the plugin in the search bar.After searching it install and activate the plugin

Now go to settings on the wordpress dashboard, choose the insert headers and footers option, and click on it.

You will now see two boxes to add the header and footer code. Go back to your Google Tag Manager account and copy the code in the head tag box and paste In the ‘Scripts in the Header’ box.

Copy the Body tag code from your Tag Manager account and paste it in the ‘Scripts in Footer’ box.

After that, click Save to apply the changes. 

You’ve successfully installed google tag manager code to a wordpress site. Now you can use your google tag manager dashboard to install any tracking code to your wordpress website.

Now connect google analytics with google tag manager. 

You will need to set up a tag after you have successfully entered the code snippet on your website. Start by pressing the New Tag button.

You may rename the tag by clicking the Untitled Tag area. Then press on the large icon where it says choose a tag type to begin setup.

Now choose tag type as google analytics: Universal analytics.

Then, press the Google Analytics Settings dropdown menu and choose New Variable.

After that, give your attribute a name and enter your Google Analytics Tracking ID. There are more settings you can see there keep them as they are for now. When you’re done, click Save.

Now you have to set up a trigger. To do that, click on choose a trigger to make this tag fire.

After choose all pages for google analytics implementing.

Now click on the Save button to publish your google analytics tag.

Finally, you have to publish your newly created tags. Mark your tags to publish and click on the publish button.

Google Analytics has been successfully implemented with the Google Tag Manager. Your Google Analytics tag will run on every page. 

How to Install gtag.js to WordPress website Using Monsterinsights

MonsterInsights is a great way to track visitors, collect important data, and monitor keywords. The information you collect can be leveraged for many aspects of your online marketing strategy. This program is so flexible that it can be used for almost any purpose that your website might require. There is a very affordable fee associated with the software. This is well worth the cost, as you will quickly see the benefits of using this software for your business. Start optimizing your site and gaining more traffic today!

MonsterInsights is the perfect Google Analytics plugin for WordPress websites. It helps you to quickly set up Google Analytics in WordPress right from your WordPress dashboard. Because of this, you’re not going to have to log in to any third-party pages or bother with countless tracking codes.

Steps to connect Monsterinsights to google analytics

First, Install the monster insights plugin to wordpress.

Go to plugins in the wordpress dashboard and search for Monsterinsights, and install and activate the plugin.

Install the Monsterinsights Plugin

So the first step is to Install the Monsterinsights plugin. For this you need a Monsterinsights Pro planFor this you need to visit the Monsterinsights website and choose their Pro plan

Once you have done the above step then login to your Monsterinsights account and go to the downloads section, there you will see a button “Download Monsterinsights” 

Image Courtesy – Monsterinsights

Once you click on the “Download Monsterinsights” button a ZIP file will be downloaded (might be downloaded to your computer). 

Now navigate to your WordPress dashboard and click on Plugins→ Add New →×216&!9&btvi=5&fsb=1&xpc=XLbViiV2X8&p=https%3A//

Once you click on “Add New” you will come across “Add Plugin [Upload Plugin]” option

Once you click on “Upload Plugin” you will get a screen similar to the one shown below.

Now you have to upload the ZIP file which you had downloaded to your computer. Once you have chosen the ZIP file then click on “Install Now”

Once you click on “Install Now” then you should Activate the plugin. Once you have activated the plugin you will have to enter the license key which you can find under Downloads when you login to your Monsterinsights account. Refer to the below given screenshot.

Image Courtesy – Monsterinsights

2. Paste the License Key

Once you have found the License Key you will copy it and paste it inside the space provided for License key. Let us see how you can do that.

Navigate to your WordPress dashboard and navigate to the “Insights” section. Now click on Insights–> Settings (You can refer to the below screenshot to understand this step better)

Once you click on Settings you will come across a box wherein you have to enter the LIcense Key (refer to the below screenshot)

Now go to insights in the wordpress dashboard, choose Settings, and click on the connect Monsterinsights button to authenticate your Google account.

Choose your google account you want to connect with

Next, click the allow button to give access to your google analytics account.

Now you have to choose the option of website profile you want to Authenticate with MonsterInsightsIn the dropdown find your website and then click complete authentication.

Now you’re all set. It can take upto 24 hours for the Monsterinsights dashboard to display your data.

Leave a Comment

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