You are using an older browser that might negatively affect how this site is displayed. Please update to a modern browser to have a better experience. Sorry for the inconvenience!

Google Tag Manager


What is GTM?

GTM is for managing Google Analytics, advertising and other tracking tags across your website, multiple websites and mobile apps.

Google Tag Manager is a Tag Management System and free solution introduced in Oct 2012.

Tag Management Systems aim to simplify the deployment and maintenance of JavaScript tags.

TMS is designed to help manage the lifecycle of e-marketing tags, which are used to integrate third party software into digital properties.

Tags are tiny bits of website code that lets you to measure traffic and visitor behavior.

How it Works?

GTM replace the multiple tags with a single Container tag and afterwards arrange and “fire” individual tags as appropriate based on business rules.

How to configure GTM?

  1. Create a Google Tag Manager account
  1. Create a container for your site in the account
  1. Add the container snippet to your site

Add an account and create a container

Create a Tag for Button Click Events

Create a Trigger for Button click

Create a Variable

Default Built in Variable:

  1. Click Classes
  1. Click Element
  1. Click ID
  1. Click Target
  1. Page Path
  1. Referrer

GTM Snippet:

Paste this code as high in the <head> of the page as possible:

<!– Google Tag Manager –>

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:

new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],

j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=

‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);

})(window,document,’script’,’dataLayer’,’GTM-MN3XL7′);</script>

<!– End Google Tag Manager –>

Additionally, paste this code immediately after the opening <body> tag:

<!– Google Tag Manager (noscript) –>

<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-MN3XL7″

height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>

<!– End Google Tag Manager (noscript) –>

Pros:

  1. Improves the quality of data
  1. Increases business growth
  1. Simplifies the tracking info using tags

Cons:

  1. Incorrect and duplicate tags make data inconsistent and loss

Google Tag Manager consists of these four main parts:

Container: A container is comprised of a set of tags, triggers and variables

Tag: A snippet of code (usually JavaScript) added to a page.

Triggers: Defines when and where tags are executed.

Variables: Used to receive or store information to be used by tags and triggers.

How to track GTM?

  1. Add a “Google Tag Assistant” extension in your chrome browser
  1. Click the “Enable” button to view the tracking from the browser
  1. Refresh the page
  1. Now you could see the fired tags will be available in extension