Header Responsive Ads

Google Tag Manager 

google tag manager


What is google tag manager 

What does google tag manager do

How to use google tag manager in website

How to use google tag manager with google analytic

How to use google tag manager for facebook pixel

What is Google Tag Manager

Google tag manager is google free product which provide us central tag management system for digital marketing. 

What is Tag

Tag is small piece of code snippet which we include in our website. For example we add Google Analytics tracking code in our website to send user’s activities to google analytic. Based on this information, google analytics show us different statistics. 

What is the use of GTM

Consider a scenario. We have to track the behavior of our facebook users so that we can show facebook ads to our targeted audiances. We also have to track the behavior of other social media platforms like twitter, linkedin, pinterest and place ad on each platform based on its user’s behavior so that we can show ads to only interested users. For this, we have to include tags of all social platforms in our website which is very costly for us as a digital marketer because it increase website loading time as all tags are fired at the time of page load. 

Google tag manager resolve this issue as we just have to include tag of GTM in our website and then add tags of all other social platforms in GTM. Now we have a control on all tags and we can fire each tag based on certain event triggered in different time. It means that all tags are not fired on page load so it does not affect page loading speed. 

GTM even track deeper then GA as it tracks scroll depth, video watched, number of people spending 15 seconds or more on your site and much more. 

It contains account setup and container setup. One account can have multiple containers. Your each website or blog is a container. You may set any account name. 

You can use GTM for android, iOS and AMP purpose. 

Add GTM to website

Sign in to GTM. In account setup, give your account name and select country. In container setup, provide your container name (website name) and select web. Now hit create.

add gtm to website

GTM will show a popup window containing two pieces of code. If not then click on your GTM-Code link. Copy first code and paste in the head section of your website. Copy second code and insert just after the body tag of your website. 

gtm code

How to verify GTM integration with your website

Load your website in browser, inspect and find googletagmanager. If you find it then GTM is integrated with your website successfully. 

Google Tag Assistant

Install this chrome extention to view all fired tags in website. 

Dashboard of GTM 

It contains three main things tag, trigger and variable. If you understand them, you will understand all mechanism of GTM. 

What is GTM Tag

It is small snippet of code like google analytic tracking tag, google ads remarketing tag, twitter universal website tag, facebook pixel tag. Each tag track user activities and send this statistics to its respective server as facebook pexel tag will send user activities to facebook server. 

What is GTM Triggers

GTM contains all tags and fire any tag based on a particular event occurs. So it does not reduce your website loading speed. In gtm, these events are called triggers as page view, click, page load etc. 

What is GTM Variables 

A variable is something that contains a value which is being changed dynamically. There are many predefined gtm variables. However you can create your own variables. Example is video duration which can be 1 minute at a time and 5 minutes at other time which means that variable video duration contains different values based on time. When our trigger is activated, at the same time data is stored in the variables. Using these variables, we show data in google analytics. 

how to create tag in google tag manager

Suppose we want to send user activities statistic to google analytic on webpage view. For this first create new tag and name it Page View Tag as below

gtm tag

GTM triggers

Next step is to create a Page View Trigger and associate it with tag as below

gtm triggers

How to verify that a tag is being fired on page view trigger? 

How to check gtm tags. For this, we have to turn on gtm preview and debug mode.
Before going to preview and debug mode, make sure that both GTM tags has been embedded in the head and body section of your website. Hit on preview at top right and it will take the browser to the preview and debug mode. 

gtm debug

Now load the website in browser, Tag Manager pane will appear horizontally at bottom of the page as below. In left pan, all triggers are displayed and on right side, all tags (fires and not fired) are appeared.

browser gtm debug mode


Create tag which will be fired on Click Text trigger or click link trigger.

Create a scenario as when value of variable video duration becomes 10 minutes, a trigger becomes active and fire its associated tag. 

Similarly you can create so many built in triggers like click element, click classes, form target etc. 

Track GTM events in Google Analytic

Open Google Analytic and view event section. Here you will see all fired tags statistics. You can generate a report based on this information and make future decistion.

Integrate third party tag in GTM 

How to integrate Twitter conversion tracking tag in GTM 

Go to Twitter Ads -> Tools -> Conversion Tracking -> View code and installation instructions. Here just copy ID from code. 

Go to GTM, create new Twitter Universal Website Tag in GTM and insert copied code here. Now create trigger to fire this tag. Install chrome extension Twitter Pixel Helper to view the fired tags. 

GTM add facebook pixel

By default, gtm contains many built in tag templates. However, facebook pixel tag not exist here. To add facebook pixel tag template, follow few steps
  • Go to gtmtemplates which provide so many ready make templates. 
  • Find and download facebook pixel template in ppl format
  • Go to GTM templates. Click new and import facebook pixel template. Now while creating a new tag, you will find facebook pixel template available in built in templates list

Post a Comment

Previous Post Next Post

In Article Ads 1 Before Post

In Article Ads 2 After Post