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.
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?
- Create a Google Tag Manager account
- Create a container for your site in the account
- 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:
- Click Classes
- Click Element
- Click ID
- Click Target
- Page Path
Paste this code as high in the <head> of the page as possible:
<!– Google Tag Manager –>
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s),
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>
- Improves the quality of data
- Increases business growth
- Simplifies the tracking info using tags
- 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
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?
- Add a “Google Tag Assistant” extension in your chrome browser
- Click the “Enable” button to view the tracking from the browser
- Refresh the page
- Now you could see the fired tags will be available in extension