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 →

https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-6042151753130336&output=html&h=216&adk=2605238573&adf=2213427085&pi=t.aa~a.2648202383~rp.4&w=753&lmt=1615490088&nsk=8bf2b230&rafmt=11&pwprc=3661391044&psa=1&ad_type=text_image&format=753×216&url=https%3A%2F%2Fsearchenginearena.com%2Fhow-to-install-google-analytics-on-woocommerce-store%2F&flash=0&pra=3&wgl=1&fa=26&adsid=ChAIgJynggYQhKCVutP7gvE-Ej0A-NCDfmUd8L1DhUgiIxA5p7oqR-eFyeWTfNd2ihFuF9Umyop6FDuf12_jhbKZN_5MJPGGhFauRkw5Nmk9&uach=WyJXaW5kb3dzIiwiMTAuMCIsIng4NiIsIiIsIjg4LjAuNDMyNC4xOTAiLFtdXQ..&dt=1615490082575&bpp=1&bdt=1302&idt=1&shv=r20210309&cbv=r20190131&ptt=9&saldr=aa&abxe=1&cookie=ID%3Da29d0ee978567e88-22a7403c41c600e7%3AT%3D1615184325%3ART%3D1615184325%3AS%3DALNI_MaQ_8WXeOAqo_6zvgbyuCM5BcWk-g&prev_fmts=0x0%2C1163x280%2C753x280%2C753x280%2C753x280%2C288x600&nras=7&correlator=822692833058&frm=20&pv=1&ga_vid=2045155245.1615184324&ga_sid=1615490082&ga_hid=1946518172&ga_fc=0&u_tz=330&u_his=5&u_java=0&u_h=864&u_w=1536&u_ah=824&u_aw=1536&u_cd=24&u_nplug=3&u_nmime=4&adx=178&ady=3273&biw=1519&bih=722&scr_x=0&scr_y=405&eid=44736524%2C21066923%2C21068945&oid=3&pvsid=1270304114293553&pem=218&ref=https%3A%2F%2Fsearchenginearena.com%2Fpage%2F3%2F&rx=0&eae=0&fc=1792&brdim=0%2C0%2C0%2C0%2C1536%2C0%2C1536%2C824%2C1536%2C722&vis=1&rsz=%7C%7Cs%7C&abl=NS&fu=8320&bc=31&jar=2021-03-11-19&ifi=9&uci=a!9&btvi=5&fsb=1&xpc=XLbViiV2X8&p=https%3A//searchenginearena.com&dtd=5628

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 *