How to Implement Google Analytics With Google Tag Manager
To implement Google Analytics on your website via Google Tag Manager (GTM) follow the steps below:
Step-1: Login to your Google Analytics account and then open your reporting view.
Step-2: Click on the wheel icon at the bottom left of your screen in order to access the GA admin area:
Step-3: Click on ‘Tracking Code’ link (under Property column > Tracking Info):
Step-4: Take a note of the tracking ID. You would need this ID later when you set up Google Analytics via GTM:
Step-5: Login to your GTM account and then click on the link ‘Add a new tag’:
Step-6: Name your tag ‘Google Analytics Tracking – All Pages’:
Step-7: Click on ‘Choose a tag type to begin setup…’ button:
Step-8: Select ‘Google Analytics Universal Analytics’ from the list of featured tags:
Step-9: Click on the checkbox ‘Enable overriding settings in this tag‘ and then enter the tracking ID of your Google Analytics property in the ‘Tracking ID’ text box:
Note: Do not enter the tracking ID you see in the screenshot. Otherwise, your Google Analytics tracking won’t work. Enter the tracking ID of your Google Analytics property.
Step-10: Scroll down and then click on ‘Choose a trigger to make this tag fire…’
Step-11: Click on ‘All Pages’ trigger as we want the Google Analytics tracking code to fire on all the web pages of our website:
Your entire tag configuration should now look like the one below:
Step-12: Click on the ‘Save’ button to complete the process of creating a new tag. You will now see your new tag listed under the ‘Tags’ section:
Step-13: Click on the ‘preview’ button on the top left hand side to test the tag on your website:
Once you have clicked on the ‘preview’ button, you will see a message box like the one below:
Step-14: Now visit your website, scroll down to the bottom of the window and look for a debugging window, like the one below:
This debugging window is telling you, that if you publish your Google Analytics tag on the live website, it should fire/execute.
Note: Make sure that, not only the tag is firing but it is also not breaking the website design and/or functionality in any way.
Step-15: Once you have tested your new tag, head back to GTM and click on the ‘Leave Preview Mode’ link :
Step-16: Click on the ‘Submit’ button in the top navigation:
Step-17: Enter your version name and version description (like the one below) and then click on the ‘Publish’ button:
This action will install Google analytics on your website via Google Tag Manager.
Step-18: Now remove the hardcoded Google Analytics tracking code from all of the web pages on your website. If the Google Analytics tracking code is not hardcoded on your website then you can skip this step.
That’s how you can implement Google Analytics on your website via Google Tag Manager.
Related Articles
- What is the difference between google tag manager and google analytics?
- Five main benefits of using Google Tag Manager
- How to Install Google Tag Manager on your website
- How to install Google Tag Manager on your WordPress Website
- Understanding Google Tag Manager Container Tag
- How to Get Google Tag Manager Container ID
- How to give someone access to Google Tag Manager Account?
- Importing and Exporting Container Files in Google Tag Manager
- Guide to Google Tag Manager Templates
- Introduction to Folders in Google Tag Manager
- Google Tag Manager Tutorial
To implement Google Analytics on your website via Google Tag Manager (GTM) follow the steps below:
Step-1: Login to your Google Analytics account and then open your reporting view.
Step-2: Click on the wheel icon at the bottom left of your screen in order to access the GA admin area:
Step-3: Click on ‘Tracking Code’ link (under Property column > Tracking Info):
Step-4: Take a note of the tracking ID. You would need this ID later when you set up Google Analytics via GTM:
Step-5: Login to your GTM account and then click on the link ‘Add a new tag’:
Step-6: Name your tag ‘Google Analytics Tracking – All Pages’:
Step-7: Click on ‘Choose a tag type to begin setup…’ button:
Step-8: Select ‘Google Analytics Universal Analytics’ from the list of featured tags:
Step-9: Click on the checkbox ‘Enable overriding settings in this tag‘ and then enter the tracking ID of your Google Analytics property in the ‘Tracking ID’ text box:
Note: Do not enter the tracking ID you see in the screenshot. Otherwise, your Google Analytics tracking won’t work. Enter the tracking ID of your Google Analytics property.
Step-10: Scroll down and then click on ‘Choose a trigger to make this tag fire…’
Step-11: Click on ‘All Pages’ trigger as we want the Google Analytics tracking code to fire on all the web pages of our website:
Your entire tag configuration should now look like the one below:
Step-12: Click on the ‘Save’ button to complete the process of creating a new tag. You will now see your new tag listed under the ‘Tags’ section:
Step-13: Click on the ‘preview’ button on the top left hand side to test the tag on your website:
Once you have clicked on the ‘preview’ button, you will see a message box like the one below:
Step-14: Now visit your website, scroll down to the bottom of the window and look for a debugging window, like the one below:
This debugging window is telling you, that if you publish your Google Analytics tag on the live website, it should fire/execute.
Note: Make sure that, not only the tag is firing but it is also not breaking the website design and/or functionality in any way.
Step-15: Once you have tested your new tag, head back to GTM and click on the ‘Leave Preview Mode’ link :
Step-16: Click on the ‘Submit’ button in the top navigation:
Step-17: Enter your version name and version description (like the one below) and then click on the ‘Publish’ button:
This action will install Google analytics on your website via Google Tag Manager.
Step-18: Now remove the hardcoded Google Analytics tracking code from all of the web pages on your website. If the Google Analytics tracking code is not hardcoded on your website then you can skip this step.
That’s how you can implement Google Analytics on your website via Google Tag Manager.
Related Articles
- What is the difference between google tag manager and google analytics?
- Five main benefits of using Google Tag Manager
- How to Install Google Tag Manager on your website
- How to install Google Tag Manager on your WordPress Website
- Understanding Google Tag Manager Container Tag
- How to Get Google Tag Manager Container ID
- How to give someone access to Google Tag Manager Account?
- Importing and Exporting Container Files in Google Tag Manager
- Guide to Google Tag Manager Templates
- Introduction to Folders in Google Tag Manager
- Google Tag Manager Tutorial
My best selling books on Digital Analytics and Conversion Optimization
Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.
Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.
Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.
Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.