Let’s start with what Google Tag Manager is, it’s a free, global solution for managing 3rd party code snippets (or tags) on your website. It works by having one single piece of code embedded into your website template, and then all other tags are managed through it’s easy to use interface. It’s a VERY powerful tool you should be using.
We’ll go through the following:
- Making an account
- The GTM interface
- Implementing Google Analytics via Google Tag Manager
This does NOT replace Google Analytics functionality (gtag.js or Universal Analytics). There is a lot of confusion around the implementation of the latest gtag.js by Google.
We’ve mentioned the top reasons on why you want a tag management system before in Why You Should Be Using Google Tag Manager (GTM).
But to reiterate a few key points:
- One piece of code to rule them all
- Especially for multi channel marketing, have one piece of conversion logic and send off to multiple marketing analytics platforms. Eg. contact us, send info to Google Analytics, Facebook, Google Ads, etc.
- Have Google serve your additional code, less pressure on your own web hosting
- Easier to keep track of what code snippets and where they are on your website
- Streamline the code deployment process that directly involves your website
- Depending how much detail you want send to your CRM/data app, GTM also has additional functionality to grab more data you can use – this is the datalayer
Let’s get started with GTM
Start by making a Google account or sign in with an existing Google account @ https://tagmanager.google.com/, accounts are called containers.
- Account name – this can be anything, but is generally named what your overarching company/business name is
- Container name – this can also be anything and not limited to your domain like in the example, but it is generally your URL. A common hierarchy of naming is as follows:
- Bliss Agency – account name
- www.blisssearch.com.au – container
- promo.blisssearch.com.au – container
- dev.blisssearch.com.au – container
- Bliss Agency – account name
- Selecting web platform for this. Google also have similar implementations for other web based platforms
- You will then be given a 2 code snippets which need to go on your site, more on the code aspects at the end where we implement Google Analytics via Google Tag Manager
Now you should have successfully added an account to your all accounts screen:
The GTM interface
Top navigation
- Workspace – your working area for your GTM container
- Versions – view the version iterations and history for the changes made to your workspace/container
- Admin – manage users, settings, environments
- GTM-XXXXX – this is your Tag Manager ID, remember this is seperate to a UA-ID or Google Analytics ID
Sidebar navigation
- Overview – quick glance of your current workspace, it’s version and any drafts any other users have made for review
- Tags – these are where or how you are sending tracking information to other platforms like Google Analytics, Facebook Analytics for custom conversions, etc
- Triggers – think of this as an action, these are how you are tracking things on your website to send to platforms. In a simple explanation, a pageview is a trigger because something happened on site, and sending this information to GA is a tag
- Variables – these are quick reference variables for data for you to use in your tags. Eg. the variable pageTitle = “Bliss Search – Marketing Experts”. You can then use this pageTitle name/value combo anywhere within GTM
- Folders – easily categorise or group your triggers/tags/variables for what they do. Eg. group a combination of triggers and tags into its own group called Facebook, if they are all related to this platform
- Templates – a bit advanced, but in the event that you have a large organisation with many GTM users, you can use this to create custom tracking code templates, where a user will only need to provide IDs or other variables and code is automatically generated.
Eg. if you are familiar with the way Facebook custom conversion tracking works, you can provide a standard GTM user with just drop down fields for them to easily implement what they need, rather than them creating and implementing custom raw HTML
Implementing Google Analytics via Google Tag Manager
The 3 things you need before getting started:
- Google Tag Manager account – which we have gone through above
- Google Analytics ID – this starts with a UA-XXXXXX
- Access to your websites source code, primarily the template sections to access the <head> and <body>
- Implement the GTM code to your site
There are 2 ways to implement this, but in this guide will show you the recommended way.
Adding your Google Analytics UA-ID as a Variable
- Variables > New
- Click the brick icon and select Google Analytics Settings
- Paste your ID, including the UA part into the Tracking ID field
- Give the Variable a name (if let empty, GTM will name it for you) then hit Save, the other options are considered advanced and will need to be filled out if your website has things like cross domain tracking, custom dimensions/metrics and ecommerce
Your end result should be:
Now you have a somewhat difficult number to remember, linked to an actual name.
This is what a Variable is, eg. EasyToRememberName = 18573487319345123451.
Adding a Tag to the Trigger
Now you have your Variable that currently sits and does nothing at the moment, we link it to a Trigger (or action)
- Go to Tags > New
- Click the label icon or the area that says Choose a tag type to begin setup
- Select Google Analytics: Universal Analytics
- Under Google Analytics Settings, select your Variable that you just created above
- Click on the circles icon or the area that says Choose a trigger to make this tag fire
- Then select All Pages, this is a default and built in Trigger by GTM
Your end result should be:
When a page is viewed (Triggered), activate the Google Analytics Tag using our Variable with our Analytics ID.
Get your GTM code to install
You can grab your code to install on your website by clicking the GTM-XXXXX in your Overview page, and you’ll see this.
If you have other 3rd party scripts on your website, these all need to be implemented via Google Tag Manager BEFORE you remove them and install this piece of code. You need to remember GTM is here to streamline your tags and conversion code
The final part can be complex for many reasons, common ones being:
- You’re unsure what current tracking codes there are on your site, especially if you have a larger website, or doing a lot of digital marketing activity on many platforms
- You may not have the right access to not only your website code, but also your marketing analytics/custom code
- You haven’t logged the requests to have conversions or marketing code to be put onto your website for your campaigns
- There are members of the team who have access to some data and others not
It’s a really good time to review your online presence for your business, but also the analytical data you have, and who has access to it. At the end of the day, you or your company needs to own its own data, this includes marketing campaigns and any custom conversions linked with those.
Bliss recommend and use GTM on a daily and happy to guide in the right direction. Let us know if you’d like assistance or even a complete walkthrough or workshop to align it with your business.