Setting up Google Analytics through Google Tag Manager

July 18, 2016 • Internet Marketing Blog - SEO, SEM and SMO • Views: 1,749


If you are trying to make your site relevant and useful, then its performance may get affected. It is because of the reason that the tags are continuously added to the websites for enhancing their optimization, tracking and other functionalities. These tags may crowd the pages and may increase the loading time of the website. But, thanks to Google Tag Manager which allows you to manage these tags and simplify the process of implementing Google Analytics.

What is Google Tag Manager? 

Google Tag Manager, lets you add, delete or update the tags and JavaScript code snippets on your website for marketing optimization and traffic analysis. It allows you to add or update the Google Analytics, Floodlight, AdWords, Firebase Analytics and any 3rd party tags directly from the Tag Manager instead of changing the site code. Thus, this tag management system frees you from taking the help of a developer for configuring the tags.

Google Tag Manager

Components of GTM

  • Container:  A GTM container is a universal container tag or a side-wide tag, which fires the tags as per the rules that you would have set in the interface. Once a GTM container is deployed on your website, you will be able to add or modify the existing tags. Each container consists of three different elements which are:
    – Tags
    – Rules
    – Macros
  • Data Layer: It is a JavaScript object that you will find on the page which holds custom data that will be passed to GTM from your website. This data then is passed on to Google Analytics account by the GTM, for analysis. It is due to this data layer that GTM does not need to search for the data scattered over the page.
  • Events: These are the actions of interest that take place on your app or website. Your marketing goals will let you define these events.

How to implement Google Analytics through GTM?

Every internet marketer would be aware that a new world of opportunities is opened when GTM combines with Google Analytics. But, to get benefits from those opportunities, you should be well aware that how to implement the Google Analytics through GTM. Here we are mentioning the simple steps to do this implementation from the scratch.

  • Set up Google Tag Manager: First of all, you are required to put your GTM code on your website for which you would be asked to create an account. After creating an account, you would be asked to create a container.

Open Google Tag Manager


  • Create a Container: Container is a code snippet which is used in web development to eliminate the need of placing multiple data tracking codes, directly on the site. Containers can be given any name.

Create Account- Google tag manager


  • Find your tracking number: Go to Google Analytics dashboard and then select “Admin”. Next, select the property view to find tracking info and tracking code. Copy your Tracking ID and it will be your first GTM variable.

Setup- Google Tag Manager


  • Create a Constant Variable for Google Analytics: Go back to GTM dashboard and then, select “Variables”. Now, scroll to the bottom and select “User-Defined Variables”. Choose a simple name for your variable so that it would be easy to remember. Select the “Constant” button and fill your Tracking ID that you have copied earlier. Click on “Create Variable” and you will get the confirmation for its creation.

Implementing Tracking Code- Google Tag manager


  • Set up a Universal Analytics Tag: Go to the “Tag” section of GTM dashboard and click on “New”. Choose an easy name for this tag. After that, you need to configure the tag. Click on a Lego piece next to Tracking ID. Locate the Tracking ID constant variable that you have recently created and select it. Now, you can add some custom features. Like selecting “Enable Display Advertising Features” will allow you to get advanced data in the Google Analytics reports.  Further, click on “Continue” and select the “All Pages” Fire On trigger and then on “Create tag”. This will create a new tag.

Overview Page- Google Tag Manager


  • Publish the Google Analytics tag: Before publishing the tag, make sure that everything has been fired properly. For that, you can use Preview and Debug. Once you have verified that everything is OK, then you can click on “Publish Now”.

Add Tag- Google Tag Manager


This is the simplest implementation process of Google Analytics through GTM and you can play around to find advanced options. But, always be sure that what you are doing, otherwise your website will be ruined.

Share this Article