Integration of Google Tag Manager with Google Analytics
Google Analytics
The tool provides real-time monitoring of the number of users who visited the site, location, traffic sources, active pages, events like scroll depth, visible of elements, Call To Action, goal conversions. It generates various levels of reports like audience, acquisition, behavior, conversions. Google Analytics can even track the demographics of users like age, gender, language, technology like browser, operating system, marketing campaigns.
Google Tag Manager
Google tag manager (GTM) is a free tag management platform that enables marketers to deploy and track marketing data by easily adding code snippets to their website or app. It allows marketers to track conversions, website analytics, retargeting, and more without the intervention of website developers
Google tag manager was not built to replace Google analytics. Instead, the two work harmoniously to give marketers an easy-to-manage, flexible system of tracking various analytics. GTM gives marketing professionals the freedom to add, edit, or remove measurement tags without any hard coding, making the process much simpler and faster.
WHAT LED TO THIS?
On a web page, only one tracking code could be placed to track website analytics activities either it can be Google Analytics tracking code or Google Tag Manager to ease marketing professional's effort to track their campaign performance.
In the course of implementing Google Tag Manager. Marketing team replaces Google Analytics Tracking Code with Google Tag Manager Tracking
Code and assumes Google Analytics will start capturing real-time data like users visited the site, location, traffic sources, active pages, events like scroll depth, visible of elements, goal conversions.
But replacing the GTM Tracking Code with GA Tracking Code. It will serve the purpose. Google Analytics will not track real-time data.
HOW WAS IT SOLVED?
Pain Areas:
- No real-time tracking in Google Analytics (GA)
- GA will stop tracking real-time:
- Number of visitors from desktop, mobile or any other medium
- Goal conversions. It could be like e-commerce funnel, clicking on submit button
- Events like scroll depth, page element visibility
- Sources of the page visited, lead generated
- Content which pages the user visited
It can impact Google Analytics reports like audience, acquisition, behavior, conversions
Solution Provided:
Step 1:
- Replace GA Tracking code in all required web pages with GTM Tracking code
- In Google Tag Manager create a variable named 'Tracking Id' and enter the following details for variable:
- Variable Type - Google Analytical Setting
- Tracking Id - Google Analytic Tracking Id
- Cookie Domain - Auto
Step 2:
- In GTM create a new Tag named 'Page View' and enter the following details for Tag:
- Tag Type - Google Analytics - Universal Analytics
- Track Type - PageView
- Google Analytics Setting - Select variable which was created in an earlier step called 'Tracking Id"
Step 3:
- Add Trigger to Tag. We are defining the trigger point when Tag should be enabled
- In Firing Triggers select trigger named 'All Pages'
- Click Save
Step 4:
- On GTM dashboard click 'Preview' and refresh the website page
- Below of the webpage taskbar will open. The user could view GTM Task Bar
- Trigger named 'Page View' would be in green means enabled
Step 5:
- Finally on GTM 'Publish', cap the changes and refresh the webpage
- GA will start capturing real-time data
Business Benefits:
- GTM eliminates the hassle of hard coding tags for the Marketing team
- GTM can boost the website speed, GA will capture real-time data