Google Tag Manager Tutorial 2020 with FREE PDF E-Book

What is Google Tag Manager?

Google Tag Manager (also known as GTM) is a free tag management solution provided by Google. Through this online tool, you can deploy and manage various marketing and analytics tags on a website or mobile app.

What is the difference between Google Tag Manager and Google Analytics?

Google Tag Manager is a tag management tool that is used to add, edit, enable, disable, or remove a tag from a website or mobile app.

A tag is a bunch of JavaScript code that is used to collect data from your website/mobile app and then send that data to a third party tool like ‘Google Analytics’. In other words, GTM is used to collect data from your website /mobile app and then send it to Google Analytics (GA).

Following are examples of tags: Google Analytics Tracking code, Google Ads Conversion Tracking code, Facebook Pixel Code etc.

GA is a website/mobile app tracking tool. It is used to store, process, and report on the data. In GA you can query the data either via the reporting interface or via the API. You can not query the data via GTM.

GTM does not report on the data it collects. As a result, GTM does not contain any reports. GA reports on the data collected by GTM via its reporting interface or via the API. As a result, GA provides reports for data analysis.

For more detailed information, check out the article: Difference Between Google Analytics (GA) and Google Tag Manager (GTM)

What are the advantages of using Google Tag Manager?

Following are the key benefits of using Google Tag Manager (GTM):

Benefit #1: GTM removes the need for editing the website code over and over again

Benefit #2: Through GTM you can test and deploy tags very fast

Benefit #3: GTM makes advanced analytics tracking possible

Benefit #4: GTM makes tag management very efficient

Benefit #5: By using GTM, you can improve website speed

For more detailed information, check out the article: Five main benefits of using Google Tag Manager

 

Get the E-book (72 Pages)

Get the E-Book (62 Pages)

 

How to Install Google Tag Manager on a website

Follow the steps below:

  1. Create a new Google Tag Manager account using your Google login.
  2. Login to your GTM account.
  3. Click on ‘create account’ button.
  4. Name your new GTM account
  5. Select your country.
  6. Name your new container.
  7. Select ‘web’ as the target platform.
  8. Click on the ‘Create’ button.
  9. Read and accept the Google Tag Manager Terms of Service Agreement as well as data processing terms.
  10. Copy the first part of the GTM installation code and then paste it as high as possible in the <head> section of every page of your website.
  11. Copy the second part of the GTM installation code and then paste it as high as possible in the <head> section of every page of your website

For more detailed step by step tutorial, check out the article: How to Install Google Tag Manager on your website

How to Install Google Analytics on your website via Google Tag Manager

Follow the steps below:

  1. Navigate to your main GA reporting view.
  2. Navigate to the admin section.
  3. Click on ‘Tracking Code’ link (under Property column > Tracking Info)
  4. Take a note of the tracking ID.
  5. Navigate to your GTM account
  6. Create a new tag named ‘Google Analytics Tracking – All Pages’ of type ‘Google Analytics Universal Analytics’
  7. Click on the checkbox ‘Enable overriding settings in this tag‘.
  8. Enter the tracking ID of your GA property in the ‘Tracking ID’ text box.
  9. Select “All Pages” trigger.
  10. Save your tag.
  11. Preview and publish your GTM container.

For more detailed step by step tutorial, check out the article: How to Implement Google Analytics With Google Tag Manager

Introduction to Tags

A tag is a bunch of JavaScript code that is used to collect measurement and marketing data from your website/mobile app and then send that data to third-party services. The third-party service could be Google Analytics, Google Ads, Twitter, Facebook, Comscore, etc.

Following is an example of Google Analytics Tag (also known as Google Analytics Tracking code):

<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXX-Y', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->

 

Following is an example of Google Ads (Adwords) Conversion Tracking Tag (also known as Google Ads Conversion Tracking code):

<!-- Google Code for Test Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 928804124;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "wceHCILzjGQQ7drxugM";
var google_conversion_value = 100.00;
var google_conversion_currency = "GBP";
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/?value=100.00"/>
</div>
</noscript>

 

Following is an example of Facebook Tag (also known as Facebook Pixel Code):

<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');

fbq('init', '879030082151151');
fbq('track', "PageView");</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=879030082151151&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->

Other examples of tags are:

So you see, that tag is just a snippet of code.

You can add this snippet of code (or tag) directly to your website, by copying-pasting it, in your website template files (like header.php) or you can add the tag indirectly on your website, via Google Tag Manager (GTM).

Understanding the Anatomy of Google Tag Manager Tool

If you treat Google Tag Manager tool like a car, then its engine is the container tag and its skin (look and feel) and controls are the user interface.

The container tag provides all the functionality needed for the GTM tool, to run and deploy tags on your website.

The user interface makes it easy for you, as an end-user, to control the container tag. Just like, when you drive a car, the car steering, makes it easy for you to control the car engine, make it, turn the car left or right.

When coders refer to GTM, they usually refer to the container tag. When non-coders refer to GTM,  they usually refer to the user interface.

Thus depending upon the context, GTM can either mean the ‘container tag’ or the ‘user interface’.

Get the E-book (72 Pages)

Get the E-Book (62 Pages)

Google Tag Manager Container Tag

A container tag is used to hold one or more marketing and analytics tags and their corresponding triggers and variables.

A container tag can be used to deploy Google Analytics on a website. Similarly, a container tag can be used to deploy Facebook pixel tracking on a website. The container tag provides all the functionality needed for Google Tag Manager (GTM), to run and deploy tags on your website. In order to install GTM on your website, you hard code the container tag on every page of your website.

For more detailed information, check out the article: Understanding Google Tag Manager Container Tag

Creating/Using Multiple GTM Accounts

You can create multiple GTM accounts from a single Google Account login.

The rule of thumb is to create one GTM account per company/organization.

You can either create a new GTM account from scratch or you can add an existing GTM account to your GTM account. Marketing agencies generally ask their clients to add their existing GTM accounts to their GTM account.

Since you can create/add multiple GTM accounts from a single Google account, you don’t need to create, several Google accounts for managing multiple GTM accounts.

Visual Representation of the GTM Account Structure

Since the majority of businesses out there have got only one company and one website, their GTM account structure will look like the one below:

GTM Accout Structure3

 

If you are a marketing agency which owns/manages multiple GTM accounts then your GTM account structure will look like the one below:

GTM Accout Structure2

How to Migrate All of Your Hardcoded Tags to Google Tag Manager

Follow the steps below to migrate all of your hardcoded tags (the tags hardcoded on your website) to Google Tag Manager:

  1. Determine your tracking requirements
  2. Do Tag Audit of your live website
  3. Create functional and technical designs of your tags
  4. Do tag Deployment Planning
  5. Do the Risk Assessment
  6. Create a Project Scope document
  7. Get buy-in from IT
  8. Setup Google Tag Manager Account
  9. Install GTM container tag on the staging website
  10. Create, test and publish tags on your staging website
  11. Install GTM container tag on the live website
  12. Create, publish and test tags on the live website
  13. Do a tag audit of your live website.

In order to learn more about each individual step, read this article: Google Tag Manager Implementation & deployment Guide

How to Give Someone Access to a Google Tag Manager Account

Whenever you give GTM account access to a person, you give that access either at the account level or at the container level.

  • The access given at the account level is called the ‘Account permissions‘.
  • The access given at the container level is called the ‘Container permissions‘.

To learn more about GTM users and permissions, read this article: How to give someone access to Google Tag Manager Account?

How to Export / Import Container in Google Tag Manager


Through the Export Container feature, you can share your GTM configurations (aka tags, triggers, and variables) with any third party.

What that means, if you want to share your GTM configurations for video tracking with a third party or another website, you can do that via the GTM Export Container feature.

Through the Import Container feature, you can set up dozens of tags, triggers, and variables in a container tag in one go. This can come in handy when you need to set up same/similar tags, triggers and variables over and over again for multiple websites.

Without using the Import Container feature, you would have to manually set up each tag and its corresponding triggers and variables, and that too over and over again for each website.

To learn more about the export and import container feature in GTM, read this article: Importing – Exporting Container Tag in Google Tag Manager

Introduction to Google Tag Manager Templates

In Google Tag Manager (GTM), a template makes it easy:

  1. To deploy and share a tag with others within your company.
  2. To use and share a variable with others within your company.

The template which is used to deploy a tag on a website is called the tag template and the template which is used to deploy a variable is called the variable template.

To learn more about tag template, read this article: Guide to Google Tag Manager Templates

Introduction to Triggers

A ‘Trigger’ is a condition that must be met during run time for a tag to fire or not fire.

There are two types of triggers:

  1. Firing Triggers
  2. Blocking Triggers

To learn more about triggers, read this article: Beginners’ guide to Triggers and Variables in Google Tag Manager

Introduction to Variables

A variable is a storage location in the computer memory.

In the context of GTM, a variable is a function that is called from within another tag, trigger or variable.

In GTM a variable is denoted by using the following syntax:

{{Variable Name}} 

There are two types of variables in GTM:

  1. Built-in variables
  2. User-defined variables

To learn more about variables, read this article: Beginners’ guide to Triggers and Variables in Google Tag Manager

Introduction to Folders in Google Tag Manager

Through folders, you can organize tags, triggers, and variables in GTM by project name, team name, etc.

For example, you can group all of the tags, triggers and variables related to ‘video tracking‘ by creating a folder called ‘video tracking’ and then adding all of the related tags, triggers, and variables to it.

To learn more about folders in GTM, check out this article: Introduction to Folders in Google Tag Manager

Pagination for GTM Tags

If your GTM container has got more than 50 tags then the tag list is paginated. By default, only 50 tags are displayed at a time on a page which speeds up the user interface.

You can see the paginated list by clicking on the ‘Tags’ link on the left-hand side navigation and then scroll down to the bottom of the page:

Click on the > button to go to the next page.

Click on the < button to go to the previous page.

You can also click on the ‘Show Rows’ drop-down menu and click on ‘ALL’ to see all the tags listed on a single page:

Pagination for GTM Triggers

If your GTM container has got more than 50 triggers then the trigger list is paginated. By default, only 50 triggers are displayed at a time on a page.

You can see the paginated list by clicking on the ‘Triggers’ link on the left-hand side navigation and then scroll down to the bottom of the page:

Pagination for GTM Variables

If your GTM container has got more than 50 variables then the variable list is paginated. By default, only 50 variables are displayed at one time on a page.

You can see the paginated list by clicking on the ‘Variables’ link on the left-hand side navigation and then scroll down to the bottom of the page:

Search Feature in Google Tag Manager

In Google Tag Manager you can search for a particular tag, trigger or variable by using the inbuilt search box.

You can see this search box embedded on the left-hand side in your GTM workspace:

Through this search box you can search for any tag, trigger or variable:

When you click on a search result, you are redirected to a particular tag/trigger/variable.

How to search only among tags in Google Tag Manager

If you want to search only among tags then follow the steps below:

Step-1: Click on the ‘Tags’ link on the left-hand side menu:

Step-2: Click on the ‘Magnifying glass located on the right and then enter your search term:

 

Similarly, you can perform a search among triggers and variables.

Introduction to Data Layers in Google Tag Manager

In the context of GTM, a data layer is a JavaScript array that is used to collect and store data from a website and then send that data to the GTM container tag. Google recommends using data layers, for retrieving run time information.

Your web developer can set up a data layer for you. This data layer contains all the information you want to send to the container tag. 

In order to get the most out of GTM, you need to understand and use data layers. I have explained data layers in great detail, in the article: Google Tag Manager Data Layer explained like never before.

 

Get the E-book (72 Pages)

Get the E-Book (62 Pages)

 


Resources for Getting Started with Google Tag Manager


 

Read the following articles one by one, in the order in which they are mentioned:

#1 Google Tag Manager Data Layer Tutorial with Examples

To get the most out of GTM, you need to know and use data layers. This article will teach you to create simple and complex data layers within a few minutes. Always remember, GTM works best when used with data layers.

#2 Understanding Triggers and Variables in Google Tag Manager

In order to use GTM, you need to get familiar with the usage of triggers and variables. This article is going to help you with that.

#3 Google Tag Manager Implementation & Deployment Tutorial

Go through this article before you migrate all of your hardcoded tags to GTM. If you don’t then there is a high probability that you may lose a considerable amount of tracking data during migration esp. if your website is big and complex.

#4 Beginners guide to JavaScript for Google Analytics

Google Analytics itself is a JavaScript library and there is heavy use of JavaScript in GTM. So it is important that you understand what JavaScript is and how it can be used to collect data via GTM.

#5 Introduction to Google Analytics JavaScript Library – Analytics.js

Analytics.js is the engine which power Google Analytics. Whenever we refer to GA in the context of coding, we are actually referring to the analytics.js JavaScript library. The first step towards understanding the Google Analytics Developers environment is to understand the analytics.js JavaScript library.

 

#6 Introduction to Google Analytics Commands

In order to set up / troubleshoot any GA/GTM implementation, whether it is ecommerce tracking, cross-domain tracking, event tracking or enhanced ecommerce tracking, you need to understand how the ga() command queue function works.

#7 Page Tracking in Google Analytics

Through page tracking, you can measure the number of times a page was shown to your website users in GA. This can be done by sending a pageview hit, each time a page is shown. Implementing Page tracking is another step in understanding the Google Analytics Developers environment.

#8 Advanced Google Analytics Tracking – Introduction to DOM

To get the most out of GTM, you need to know what DOM is and how it can be traversed. Without adequate knowledge of DOM, you would have a hard time implementing any tracking via GTM.

#9 Regular Expression Guide for Google Analytics and Google Tag Manager

Regular expressions are frequently used in setting up complex goals and filters in GTM. Without the use of regex, you will have a hard time creating useful triggers in GTM.

#10 Understanding Google Analytics Diagnostic messages and notifications

Google Analytics diagnostic is a feature of Google Analytics through which you can identify and understand implementation issues. When you are setting up GTM, to deploy various tags on your website, this diagnostic feature will help you a lot in debugging setups (like ecommerce tracking).

 

#11 Complete Guide to Google Tag Assistant

Google tag assistant is a chrome extension through which you can troubleshoot the installation of various Google tags on a web page. It is a must-have tool for GTM debugging.

#12 Guide to Google Tag Assistant Recordings

Google tag assistant recording is one of the most useful features of Tag Assistant through which you can see the tags and events which were fired during say checkout process. You can record tags, events and interactions for any set of pages.

#13 Google Tag Manager (GTM) vs Google Analytics (GA) – 15 key differences

This article outlines the main differences between Google Tag Manager (also known as ‘GTM’) and Google Analytics (also known as ‘GA’).

#14 How to give someone access to Google Tag Manager Account?

Whenever you give GTM account access to a person, you give that access either at the account level or at the container level. The access given at the account level is called the ‘Account permissions’. The access given at the container level is called the ‘Container permissions’.

#15 How to get Google Tag Manager Container ID?

Learn to get Google Tag Manager (GTM) Container ID through this easy to understand step by step guide. The container ID is used to uniquely identify each GTM container tag.

 


Advanced Google Tag Manager Resources


 

#1 Implementing E-Commerce Tracking via Google Tag Manager

Learn to Implement E-Commerce Tracking through Google Tag Manager via this easy to understand step by step guide.

#2 Google Tag Manager Workspaces

Learn all about Google Tag Manager Workspaces through this easy to understand guide. A workspace is a container draft. When you create a new workspace in GTM, you are in fact creating a new container draft.

#3 Tracking Virtual Pageviews in Google Tag Manager – Complete Guide

Learn to track virtual pageviews in Google Tag Manager, through this easy to understand, step by step guide. A virtual pageview is that pageview hit, which you send to Google Analytics, without loading a web page in your web browser. One advantage of virtual pageviews over events is that, when you set up goals in GA, you can use virtual pageviews as funnel steps in Google Analytics.

#4 Cross device tracking with User ID in Google Tag Manager

Learn to implement cross-device tracking with the User ID in Google Tag Manager through this easy step by step guide. The user id is a unique set of alphanumeric characters (like 35464645fffs) assigned to a user so that he/she can be identified across devices/ browsers and over the course of multiple sessions.

#5 Setting up Dynamic Remarketing via Google Tag Manager

Learn to set up dynamic remarketing in Google Analytics and Google Ads via Google Tag Manager. Remarketing is a technique that is used to re-target people who left your website and/or mobile app without completing a goal conversion (like making a purchase). The people who are re-targeted are known as the remarketing audience.

 

#6 Guide to Event Tracking via Google Tag Manager

Through this article you will learn the following:

  1. Tracking clicks on a link via Google Tag Manager
  2. Tracking clicks on an image link via Google Tag Manager
  3. Tracking clicks on a button via Google Tag Manager
  4. Tracking clicks on the button which is embedded across a website
  5. Tracking form submissions
  6. Tracking Form Fields
  7. Video Tracking via Google Tag Manager
  8. Scroll Tracking via Google Tag Manager
  9. Tracking Clicks on external links across a website (Exit Tracking)

#7 Cross domain tracking in Google Tag Manager

Learn to implement cross-domain tracking in Google Tag Manager between two or more primary domains and its subdomains. Google Analytics can not track across multiple domains, sub-domains or top-level domains by default. This is because Google Analytics uses first party cookies which can be read by only that domain (website) which issued it.

#8 Implementing Scroll Tracking via Google Tag Manager

Learn to Implement Scroll Tracking through Google Tag Manager via easy to understand step by step guide. Scroll tracking is one of the methods of measuring how people are consuming your website contents. People who actually read your article are most likely to scroll your article page and by measuring the percentage of the scroll, you can get a good idea of content consumption.

#9 Adjusting Bounce Rate via Google Tag Manager

Learn to adjust the bounce rate in Google and Universal Analytics via Google Tag Manager. Bounce rate is the percentage of single page visits (or web sessions). We need to adjust the bounce rate so that you can see the true bounce rate metric in our Google Analytics report.

#10 Why you may no longer need Google Tag Manager

Understand the limitations of Google Tag Manager through this article. As your need for integrating website data with various data sources increases and become more complex, you quickly realize, how hard it can be to create and maintain each integration in GTM.

 

#11 How to install and use Google Tag Manager in Segment.com

Learn to install and use Google Tag Manager in Segment.com. Segment is a tool used to route/send data between multiple data sources. The role of ‘segment.com’ is to ‘Extract’, ‘Transform’ and ‘Load’ data between different data sources.  It acts as a hub between originating and destination data sources.

#12 Google Tag Manager Content Grouping Setup Guide

Through this article, you will learn to set up content grouping in Google Analytics via Google Tag Manager. In the context of Google Analytics, a ‘Content grouping’ is a rule-based grouping of related content groups.

#13 Google Tag Manager WordPress Installation Guide

Learn to correctly install Google Tag Manager on your WordPress Website through this easy to understand step by step guide.

#14 Google Analytics Settings Variable in Google Tag Manager Explained

Manually updating each and every ‘Universal Analytics’ tag to make sure all such tags have got same basic configuration options is time-consuming and not practical esp. if you have got dozens or even hundreds of Universal Analytics tags. Here the ‘Google Analytics Settings’ variable comes handy.  Through this variable you can set, change and apply any or all of the configuration options under ‘More Settings’ (like ‘Fields to Set’, ‘Custom Dimensions’, ‘Custom Metrics’, ‘Content Groups’, ‘Ecommerce’ etc) from one central location to all tags of type ‘Universal Analytics’.

#15 Learn to install Google Tag Manager on your Shopify Store

Learn to install GTM on your Shopify store through this easy to understand step by step guide. If you are into ecommerce, chances are, you have heard of ‘Shopify’. It is one of the most popular, ready made shopping cart solutions in the world. Shopify directly integrates with Google Analytics. The set up is pretty simple. But when it comes to Google Tag Manager, there is no direct integration.

 

#16 Learn to correctly set up Google Analytics for Shopify Store while using Google Tag Manager

Are you using Google Tag Manager or do you want to use GTM, for your Shopify Store? If that is the case then do not deploy the Google Analytics tag via Google Tag Manager. If you used GTM to install Google Analytics on your Shopify store (which you technically can) then your cross domain tracking won’t work. So do not use GTM to deploy Google Analytics on your Shopify Store.

#17 Scroll Tracking via Scroll Depth Trigger in Google Tag Manager

Learn to use the new Scroll depth trigger in Google Tag Manager to track, how far website visitors scroll contents on your website. The term which denotes, how far website visitors scroll contents on your website is called the ‘Scroll Depth’. The tracking method which is used to measure ‘Scroll Depth’ is called ‘Scroll Depth Tracking’ or ‘Scroll Tracking’.

#18 Video Tracking via YouTube Video Trigger In Google Tag Manager

Learn to use the YouTube Video trigger in Google Tag Manager…to track YouTube Videos embedded on a webpage. The tracking method which is used to track/capture the various player states of an embedded video is called ‘video tracking’.

#19 Guide to Google Tag Manager Debug Console

Through Google Tag Manager preview and debug console window, you can make sure that your tags, triggers, variables and data layers work as expected. By default, what you actually preview and debug is the deployment of the current container draft on your website.You preview and debug the container draft on your website as if it is currently deployed.

#20 How to send Client ID to Google Analytics via Google Tag Manager

Learn to send Client ID to Google Analytics via Google Tag Manager through step by step guide.  Google Analytics identifies a user as unique through a combination of unique random numbers and the first timestamp (i.e. the time of the first visit), called the ‘Client ID’. This ID is created and assigned by Google Analytics cookie _ga.

 

#21 Secret to Setup Facebook Pixel Tracking Correctly in Google Tag Manager

Do you know, most likely your Facebook Pixel tracking in Google Tag Manager is not set up correctly and it is costing you money? In this article, I will show you, how to set up Facebook Pixel Tracking Correctly when using Google Tag Manager.

#22 Importing – Exporting Container files in Google Tag Manager

Complete guide to importing and exporting containers in Google Tag Manager. Through the export container feature, you can share your GTM configurations (aka tags, triggers and variables) with any third party. The GTM export container feature is basically equivalent to downloading a particular container version or workspace.

#23 How to turn on IP Anonymization in Google Analytics and Google Tag Manager

Learn to turn on IP Anonymization in Google Analytics and Google Tag Manager through this step by step guide. If your privacy policy or local privacy laws prevent the storage of full IP addresses then you can use the IP anonymization feature to anonymize/mask website visitors IPs. This will help you in complying with GDPR (General Data Protection Regulation).

#24 Setting up tracking for apps and web property via Google Tag Manager (GTM)

Learn to set up tracking for apps and web property via Google Tag Manager (GTM) through this easy to understand step by step guide.

#25 How to use custom templates in Google Tag Manager

Learn to use custom templates in Google Tag Manager through this step by step guide.

#26 Server-side tagging in Google Tag Manager

Learn about server-side tagging in Google Tag Manager through this step by step guide

 


Google Tag Manager Tools

 

Another article you will find useful: Implementing rollup reporting in Google Analytics 

Frequently Asked Questions (FAQ) about Google Tag Manager

What is Google Tag Manager?

Google Tag Manager (also known as GTM) is a free tag management solution provided by Google. Through this 'online tool', you can deploy and manage various marketing and analytics tags on a website or mobile app.

What is a tag in Google Tag Manager?

A tag is a bunch of JavaScript code which is used to collect measurement and marketing data from your website/mobile app and then send that data to 3rd party services. The third-party service could be: Google Analytics, Google Adwords, Twitter, Facebook, Comscore etc.

What is the advantage of using Google Tag Manager?

When you use Google Tag Manager (GTM) to add tags on a website, you get more control over: 1) When the tag should fire. 2) When the tag should not fire. 3) Where the tag should fire. 4) Where the tag should not fire and What the tag should do, when it get fired (executed). GTM removes the need for editing the website code over and over again just for adding, removing or editing tags.

What is a container tag?

GTM removes the need for editing the website code over and over again just for adding, removing or editing tags. Instead, one code is placed on every page on the website, which is the GTM container code/tag. This container code literally acts as a container, as it can store and deploy several marketing and analytics tags. If you treat Google Tag Manager tool like a car, then its engine is the container tag and its skin (look and feel) and controls are the user interface. The container tag provides all the functionality needed for GTM tool, to run and deploy tags on your website.

What is GTM Container ID?

The part of the GTM container tag code which reads 'GTM-TXAAA', it is called the container ID. This ID is used to uniquely identify each GTM container tag.

What is a Google Tag Manager Account?

https://tagmanager.google.com/ is your GTM account.

What is a Google Account?

This is a google account: https://accounts.google.com/SignUp If you do not have a Google account then you can create one by using this link: https://accounts.google.com/SignUp Note: If you use Gmail then you already have a google account.

What is a trigger in Google Tag Manager?

A trigger is a condition that must evaluate to either true or false at run time. In GTM, triggers are an integral part of a tag creation process. So you can not create a tag without first creating the corresponding trigger. There are two methods for creating a trigger in GTM. One is while you are creating a new tag and one is through the triggers menu. There are two categories of triggers in GTM: a) Firing triggers (commonly known as triggers) b) Blocking triggers.

What is a variable in Google Tag Manager?

A variable is a storage location in the computer memory. In the context of GTM, a variable is a function that is called from within another tag, trigger or variable. In GTM a variable is denoted by using the following syntax:{{Variable Name}} . There are two types of variables in GTM: Built-in variables and user-defined variables.

What are Folders in Google Tag Manager?

Through folders, you can organize tags, triggers and variables by project name, team name etc. For example, you can group all of the tags, triggers and variables related to 'video tracking' by creating a folder called 'video tracking' and then adding all of the related tags, triggers and variables to it.

What is data layer in Google Tag Manager?

In the context of GTM, a data layer is a JavaScript array which is used to collect and store data from a website and then send that data to the GTM container tag. Google recommends to use data layers, for retrieving run time information. Your web developer can set up a data layer for you. This data layer contains all the information you want to send to the container tag.In order to get the most out of GTM, you need to understand and use data layers.

Is Google Tag Manager easy to use for a non-coder?

Yes but only to a very limited extent.If you want to considerably modify the way, a tag is fired or should behave, or if you want to implement advanced tracking like scroll tracking, ecommerce tracking or enhanced ecommerce tracking then you need to have adequate knowledge of: HTML, DOM, and JavaScript. If you can not traverse a DOM, you won't be able to get the best out of GTM. Many non-coders start using GTM on Google's recommendation but then they quickly get lost during the tags' setup and configuration. Once they can't figure out, what is going wrong, they have no choice but to delegate the set up to a third party GTM expert/agency.

Is Google Tag Manager easy to use for a coder?

Yes but only to an extent. Though coders/developers have adequate knowledge of: HTML, DOM, and JavaScript, they are still not familiar with the Google Analytics Developers environment. This makes it difficult for them to capture GA data with or without GTM.

How do I become a GTM expert?

In order to become a GTM expert, you would need to develop very good knowledge of: a) HTML, DOM and JavaScript b) Google Analytics Developers environment. c) DOM Scraping d) At least working knowledge of regular expressions e) Working knowledge of a server-side language (like PHP) is a bonus.

Will Google Tag Manager make me independent from the IT/Web developer?

Yes but only to an extent. Even when you have got adequate knowledge of HTML, DOM, and JavaScript, you would still need the help of the client's web developers/IT. This is because, if you are not familiar with the server-side language used by your client and/or the client's development environment or database, then you will need the help of client's IT/web developer, to add server-side code to your data layers or to query their database for you. Without adding sever side code to GTM data layers, you can't implement many of the sophisticated trackings like 'enhanced ecommerce tracking' in GA. The best practice is, to always involve your web developer / IT (no matter how confident you feel about your tags setup) during tag planning and deployment, as they understand their development environment better than you.

Can the use of Google Tag Manager create serious tracking/technical issues on my website?

Yes. If you are deploying all of the marketing and analytics tags via the container tag and the container breaks during a website/code update, then all of your website tracking can stop working immediately. If you deploy a tag which conflicts with the website code, it can very easily break/modify certain website functionality. Similarly, if you leave the tags deployed by GTM, hard-coded on your website or you deploy the same tags through other tag management solutions, then this can inflate your analytics data. So you need to be very confident, what you are doing with GTM. In the wrong hands, GTM can be a dangerous tool.

Can I use the same container tag on multiple websites?

Yes. However, the best practice is, not to do that, as it can create tracking issues.

Can I deploy GTM container tag code through another TMS (Tag Management Solution)?

Yes. But it can prevent GTM from working correctly. The rule of thumb is, not to use multiple TMS.

Are there any tags which can't be deployed via GTM?

Yes. GTM can not be used to deploy: synchronous tags, two-part tags, tags that are associated with in-page structure or tags which are not compatible with GTM: 1) Synchronous tags - these tags block rendering of other web page elements when they are executed. 2) Tags associated with in-page structure - like social sharing widgets 3) Two parts tags - Tags with part of the snippet in the header and the other part in footer. 4) Tags not compatible with GTM - For example 'Facebook JavaScript SDK' tag can not be deployed via GTM.

Do I have to migrate all of my tags to Google Tag Manager?

No. However Google recommends to migrate all the tags which are supported by GTM.

Does GTM work, even if you migrate only a subset of tags to Google Tag Manager?

Yes.

Does GTM collect any data?

No. GTM itself does not collect any data. However, the tags it fires, may collect data.

What is the difference between Google Tag Manager and Google Analytics?

GTM is a tag management tool. Whereas Google Analytics is a website/mobile app tracking tool. Through GTM you can: add, edit, enable, disable or remove any tag, with just few button clicks. That is something, which is not possible with Google Analytics. ‘GTM’ is primarily used to route data from one data source to another (like from your website to Google Analytics or from your website to a data warehouse). It is not a data source in itself. Whereas Google Analytics is a data source in itself.

Can I use Google Tag Manager even when I don't use Google Analytics?

Yes. GTM is a tag management solution and can be used to deploy non-google tags.

How I can deploy non-google tags via GTM?

Through custom HTML tags or 3rd party tag templates.

Does GTM work on mobile websites and mobile apps?

Yes.

Will the use of GTM, slow down my website?

No. Since GTM fire tags asynchronously, it can actually improve the website speed. However, there is one caveat here. If your container tag is very large (contains lot of tags, triggers and variables) then it can negatively affect the website speed. So if you are not using a particular tag, trigger or variable and you have no plan to use it in the future then remove it from the container.

Can I use Google tag manager in parallel with hard-coded tags?

Yes. If complete migration of all of your tags is not possible. However, you need to make sure that you don’t do double tagging i.e. deploy same tag twice, once via GTM and once without GTM.

Will GTM work, if I deploy it, on only a part of my website?

Yes. But then it will work, only on those web pages which contain the container tag.

Which type of tags are most likely to break my website functionality?

Custom HTML tags. Be very careful with them. Use tag templates wherever possible esp. if you are brand new to GTM.

GTM is protocol relative. What does that mean?

It means it will work on both secure (HTTPS) and nonsecure (HTTP) pages alike.

What is Google Tag Manager V2 (or GTM V2)?

It is the second and better version of Google Tag Manager. To access GTM V2, navigate to: https://tagmanager.google.com/

What is a rule in GTM?

GTM trigger was formerly known as rule.

What is a macro in GTM?

GTM variable was formerly known as macro.

What is the use of GTM API?

Through GTM API you can programmatically manage: accounts, containers, permissions, variables, tags and triggers.

How and where to get Google Tag Manager Help?

Before you ask for help from someone, do a quick search on Google to see whether your question has already been answered. There is almost always a high probability that someone faced the same problem before you and got help. If Google search does not help then the next step is to check out the Google Tag Manager Help Center. If you are a developer then take a look at the official GTM Developer Guide. If these resources do not help then post your question on a forum. However, before you post a question, make sure that your question clearly describes the way you encountered the problem. This is required so that your problem can be easily replicated by the people who are ready to help you. If you just state your problem but do not disclose, how you encountered it (preferably step by step) then it would be very difficult for someone to help you. Include screenshots, provide website URLs whenever you can. The more clearly you can describe your problem, the better is the chance that someone will be able to help you. The Official Google Tag Manager Forum and Stack Overflow are other great places to ask any questions related to Google Tag Manager.

 

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

Himanshu Sharma

Digital Marketing Consultant and Founder of Optimizesmart.com

Himanshu helps business owners and marketing professionals in generating more sales and ROI by fixing their website tracking issues, helping them understand their true customers' purchase journey and helping them determine the most effective marketing channels for investment.

He has over 12 years of experience in digital analytics and digital marketing.

He was nominated for the Digital Analytics Association's Awards for Excellence. The Digital Analytics Association is a world-renowned not-for-profit association that helps organisations overcome the challenges of data acquisition and application.

He is the author of four best-selling books on analytics and conversion optimization:

error: Alert: Content is protected !!