Have you ever tried to install different types of scripts and tracking codes on your website which affects the performance and makes it harder to debug?
Google Tag Manager is a free cool tool that enables marketers to extract digital marketing data by using code snippets on your website. This is where you can add only 1 Javascript code to your website, then you can manage all your additional tracking codes, conversions tracking, Facebook Pixel….
The cool thing about GTM is that it loads all these scripts asynchronously, which means it does not block other elements from rendering on the page. so a slow loading script won’t block other tracking scripts or tags.
Install Google Tag Manager
- Go to https://tagmanager.google.com/ sign in with your Gmail account, the same used with Google Analytics.
- Click Create Account
- Fill the blank fields:
Usually we add the Account Name same as the Container name then choose your target platform, in our case Web and finally hit Create.
- You will access to a dashboard like this:
- Click on Admin, then on the right column, choose Install Google Tag Manager
- Follow the steps Exactly as they are mentioned otherwise, GTM will not work.
Link Google Analytics To Google Tag Manager
Today, we will only link Google Analytics to GTM but in a later post, we will show how to provide Google Analytics with more super powers grace to GTM.
- Go to https://analytics.google.com/ and access with your Gmail account.
- Then click on Admin.
- Under the second column Properties choose Tracking Info under Tracking Code copy the Tracking ID which starts with UA-
- Head back to Google Tag Manager, from the left menu click on Tags then click on New.
- You will see a page like the one hereunder:
Rename the Tag name to Google Analytics Tag or anything else that you see suitable.
Then click on Tag Configuration, a window will slide from the right, choose Google Analytics: Universal Analytics. - Keep Track Type as Page View, under Google Analytics Settings click on Select Settings Variable -> New Variable.
Name the variable something descriptive like GA Variable then paste the Tracking ID in its corresponding field, and Save. - Now click on Triggering, a window will slide from the right of the screen, click on All Pages. This means the Tag will be triggered whenever a page opens, on all pages, because you can also choose a specific page but this is a tutorial for another time.
- There are 2 main buttons on the top right side: Preview and Submit choose Preview then go to your website and hit Refresh to test if the tag is working. You will see a white bar on the bottom that will show you the tags you created.
2 main titles appear: Tags Fired on This Page and Tags Not Fired on This Page if under the first title you found the tag you created, this means the tag is working fine. - Go back to GTM and click on Leave Preview Mode, then click on Submit.
- On the Version Name field, write Google Analytics so you can easily find it later on.
Finally click Publish
We will have future posts about advanced features in Google Tag Manager and how to use them especially for your e-commerce website, we’ll cover the following articles:
- Google Tag Manager Fundamentals
- Google Tag manager For E-commerce
- Examine Some Real Case Scenarios
- Finally we will be responding to any questions and problems you have faced
That’s it!
If you have any questions or you had some problems while installing it, let me know in the comments and we will help you out.
Consider subscribing to our newsletter to be updated with new tips, tutorials and digital media news.
Leave a Comment