Google Tag Manager is one of the best tags management system introduced by Google Inc. in October 2012. It is the future of the web analytics industry. Nowadays, most digital Analytics Experts rely on Google Tag Manager as it is one of the best free web analytics tools on the market.

Google Tag Manager helps Digital Analytics Consultants to track web users by creating; Containers, Tags, Triggers, and Variables of their web projects.

A few years back, Analytics Professionals use to measure their online performance using Google Analytics. Still, since they discovered that Google Analytics tags slow down the website's performance, it requires adding tracking codes on each web page. GTM has come out as an answer for tracking your user behaviors and web performance.

Google Tag Manager

How to set up Google Tag Manager

These are the main steps you can follow for start using Google Tag Manager

  • To install Google Tag Manager use the link below
  • Click Sign button in and use your Gmail account
  • Create a GTM Account
  • Create a Container * You can create more than one
  • Under Admin/ click install GTM
  • Add Google Tag Manager codes on your website
  • Test your codes in Google Analytics
  • Submit
  • Publish
GTM Codes


  • Each Google Tag Manager Account has a unique ID number
  • GTM Hierarchy Google Account > GTM Account > Container > Components
  • Never use both Google Analytics and GTM codes on a single web page
  • You can use Google Tag Manager for any other non-Google tools

The advantages and benefits of Google Tag Manager

There are many advantages and benefits of using Google Tag Manager in your web analytics projects. Most SEO Experts and PPC Consultants use Google Tag Manager to understand the web visitors and the performance of their daily activities.

These are some of the main advantages and benefits of Google Tag Manager

  • It is free of cost
  • Easy to set up for non-IT professionals
  • It is faster to load your webpages with Google Tag Manager.
  • It uses a few numbers of scripts on each web page.
  • Works on many types of Content Management Systems and web platforms
  • It is flexible for use with other third-party tools.

The components of Google Tag Manager

Google Tag Manager is composed of the following five elements.

  • Containers
  • Tags
  • Triggers
  • Variables
  • Data Layers


A container is the main element of Google Tag Manager that allows you to link your websites to your GTM account. You can import and export your created containers with other personal projects.

A container is the first step of connecting your website to your Google Tag Manager Account. Each container has a specific name, Id, and Type. All your Tags, Triggers, and Variables are parts of your container.


  • You can link more than one website container to your Google Tag Manager account
  • One Google Tag Manager Account can have many Containers with a unique ID


Tags are collections of JavaScript codes that you can set from Google Tag Manager and Paste it to your website so that you can link and track the performance and usage of your website or mobile Applications.

Tags Types


List of Built-in Tags

Featured Tags

Google Analytics: Universal Analytics Google Marketing Platform

Google Analytics: App + Web Configuration Google Marketing Platform BETA

Google Analytics: App + Web Event Google Marketing Platform BETA

Google Ads Conversion Tracking Google Ads

Google Ads Remarketing Google Ads

Floodlight Counter Google Marketing Platform

Floodlight Sales Google Marketing Platform

Conversion Linker Google

Google Optimize Google Marketing Platform

Google Surveys Website Satisfaction Google Marketing Platform

Custom tags

Custom HTML Custom HTML Tag

Custom Image Custom Image Tag

More tags sample


Adometry Adometry

AdRoll Smart Pixel AdRoll

Audience Center 360 Audience Center 360

AWIN Conversion AWIN


Bizrate Insights Buyer Survey Solution Bizrate Insights

Bizrate Insights Site Abandonment Survey Solution Bizrate Insights

ClickTale Standard Tracking ClickTale

comScore Unified Digital Measurement comScore

Crazy Egg Crazy Egg

Criteo OneTag Criteo

DistroScale Tag DistroScale

Dstillery Universal Pixel Dstillery

Eulerian Analytics Eulerian Analytics

FoxMetrics FoxMetrics

Google Ads Calls from Website Conversion Google Ads

Recommendations AI Google Cloud

Google Flights Conversion Tracking Google Flights

Google Analytics: Classic Google Marketing Platform LEGACY

Google Trusted Stores Google Trusted Stores

Hotjar Tracking Code Hotjar

Infinity Call Tracking Tag Infinity Tracking

Intent Media Intent

K50 tracking tag K50

LeadLab LeadLab by wiredminds

LinkedIn Insight LinkedIn

Lytics JS Tag Lytics, Inc.

Marin Software Marin Software

Mediaplex - IFRAME MCT Tag Mediaplex

Mediaplex - Standard IMG ROI Tag Mediaplex

Bing Ads Universal Event Tracking Microsoft Bing Ads

Mouseflow Mouseflow

AdAdvisor Neustar

DCR Static Nielsen

Nudge Content Analytics Nudge Content Analytics

Oktopost Tracking Code Oktopost

Optimise Conversion Tag Optimise Media

Message Mate OwnerListens

Perfect Audience Pixel Perfect Audience

Personali Canvas Personali

Pinterest Tag Pinterest

Placed Placed Inc.

Pulse Insights Voice of Customer Platform Pulse Insights

Quantcas Advertise Quantcast

Quantcast Measure Quantcast

Quora Pixel Quora

SaleCycle JavaScript Tag SaleCycle

SaleCycle Pixel Tag SaleCycle

SearchForce JavaScript Tracking for Conversion Page SearchForce

SearchForce JavaScript Tracking for Landing Page SearchForce

SearchForce Redirection Tracking SearchForce

Shareaholic Shareaholic

Survicate Widget Survicate

Tapad Conversion Pixel Tapad

Tradedoubler Lead Conversion Tradedoubler

Tradedoubler Sale Conversion Tradedoubler


You can use a custom tag to copy your tracking codes as HTML tags in case it is not listed in Tag types or lists. Remember that it is not recommended to use many Custom tags because it may slow down your website.


Triggers in Google Tag Manager help digital analytics specialists to track and fire it once an event or activity happens on your websites. You can use triggers by setting the rules on which your web activities will fire.

For instance, once you set up an event such as a button click. The Trigger will fire each time the user clicks on the same button.

Keep in mind that we use Google Tag Manager Triggers for two reasons.

  • Events
  • Filters


Each Trigger must have a tag associate with it. You cannot create a trigger without a tag.

List of Google Tag Manager Triggers

Page View

Page View DOM Ready Window Loaded


All Elements Just Links

User Engagement

Element Visibility Form Submission Scroll Depth YouTube Video

Other Triggers

Custom Event History Change JavaScript Error Timer Trigger Group


In computer science, a variable is an element that can store or allocate data or information.

Google Tag Manager Variables allow you to perform your activities, such as triggers and tags related tasks. You have to tick and check the variables that related any trigger you wish to record.

Remember that a variable in Google Tag Manager can be used to call a tag, Trigger, or other variables.

There are two types of Variables in Google Tag Manager.

  • Built-in variables
  • User-defined variables

Built-in Variables

Built-in Variables are Google Tag Manager Variables that are already set by default in the GTM system. These variables' names are unchangeable.

User-defined Variables

User-defined Variables are GTM variables that can be created and changed by Google Tag Manager Users or Digital Analytics Experts.

You can assign any name to a User-defined variable.

Constant Variables

The constant variable is a GTM variable that can never change during your web tracking process. For instance, a Google Analytics ID is a constant variable that is unchangeable for each Google Tag Manager tag.

List of Google Tag Manager Variables

Configure Built-In Variables


Page URL Page Hostname Page Path Referrer


Event Environment Name Container ID Container Version Random Number HTML ID


Error Message Error URL Error Line Debug Mode


Click Element Click Classes Click ID Click Target Click URL Click Text


Form Element Form Classes Form ID Form Target Form URL Form Text


New History Fragment Old History Fragment New History State Old History State History Source


Video Provider Video Status Video URL Video Title Video Duration Video Current Time Video Percent Video Visible


Scroll Depth Threshold Scroll Depth Units Scroll Direction


Percent Visible On-Screen Duration

Data Layers in Google Tag Manager

Data Layers are optional JavaScript objects you use to pass certain web pages values you want to track with Google Tag Manager.

Google Tag Manager uses Data Layers to track specific values and events so that you can understand details related to the way users interact with your website. You can retrieve any value passed from your website.

Some of the important information you can track with Data Layer Variables

  • Product info: Product name, price, category
  • Marketing campaigns: Traffic source, medium
  • Transactions: Cart value, checkout date
  • Customers: New or returning customer


  • Passing a web page product price
  • Detecting the origin country of a user registration

Data Layer Syntax

<script> DataLayer = [ ] ; </script> Adding information in a Data Layer, you have to use dataLayer.push() function:

Passing Data Layer Values

<a href="#" onclick="dataLayer.push({ 'ShoesCategory': 'Sneaker', 'ShoesTitle': 'Yeezus by Kanye', 'Brand': 'NIKE' });">Shoes Details</a>

You have to put Data Layer codes on your web pages, especially on an element you want to track.

Data Layer has an option to create an Array that can store and collect information and data from your website. Thus, it sends the values passed to Google Tag Manager. These data can be retrieved and viewed in your Google Analytics Reports.

To get the best of Google Tag Manager Containers, you have to use Data Layers. I will explain Data Layers in detail in future articles.

Keep in mind that Data Layers allow you to pass a dynamic value on your website, especially if you want to track customers' purchases in an eCommerce platform using Data Layers to understand sales funnel.

For instance, you can use Data Layers for passing product sales and prices in Data Layers. Data Layer holds the value temporally you pass in it. Using Data Layers might help you to collect user interactions in web events.

How to install Data Layer in Google Tag Manager

  • Create New Variables
  • Select User-defined Variables
  • Select Configure
  • Variable Configuration
  • Choose Data Layer Variable

Folders in Google Tag Manager

Folders in Google Tag Manager help digital analytics professionals to arrange related tags, Triggers, and Variables.

You can create a folder for particular projects such as events that track particular web actions such as a video play or button clicks.


The elements of your website you store in a folder have to be similar or closely related.

Relationship between Google Tag Manager vs Google Analytics

Google Tag Manager and Google Analytics are tools that track web visitors and performance.

Google Analytics can track and measure whereas Google Tag Manager can only track users’ behaviors.

You have to link your Google Analytics accounts and Google Tag Manager to generate web metrics and analytics reports from GTM tags, triggers, and variables relating to your web platforms.

The advantages of relying on Google Tag Manager over Google Analytics are that GTM is easy to use and does make your website run faster because you don’t have to link your tracking codes each time you want to track any metrics.

How to link Google Analytics to Google Tag Manager

The steps to connect Google Analytics Accounts with your Google Tag Manager

  • Create a new tag
  • Configure tag
  • Select Universal Analytics
  • Name your GA
  • Add Google Analytics ID as Tracking ID
  • * Choose All Pages Trigger
  • Submit


  • After publishing your GTM container, you can test it in Real-Time performance in your Google Analytics Report.
  • You can debug your GTM container and preview it also before publishing it.

Google Tag Manager Mistakes

To get the best of Google Tag Manager, you have to avoid some of these mistakes.

  • Forgetting to publish your container
  • Not removing old Google Analytics code set up.
  • Not testing Real-Time reports performance in Google Analytics.
  • Not adding Data Layer codes before Google Tag Manager codes.
  • Publishing collectively all GTM your changes and updates.
  • Tracking your web forms with buttons clicks triggers.
  • Using multiple Conditions instead of RegEx.
  • Not organizing your GTM activities in folders
  • Not testing your tags, Triggers, and Variables
  • Forgetting to preview and debugging before publishing your tags


There are different usages of Google Tag Manager. To sum up this introduction and tutorial on how to use the main features of GTM, especially; Tags, Triggers, and Variables. Google Tag Manager is free and the future of web analytics and metrics. At least to get started with Google Tag Manager, remember that you have to understand the difference between the above GTM components and to publish different versions of your website activities.


No comments yet