Google Tag Manager (GTM) lets site owners add and update website tags - including tags for conversion tracking, site analytics and remarketing - without needing to edit your website’s code.
To access and configure GTM:
- Sign up using your team’s Google account
- Create and name your account then create and name your first container. We suggest you use the following naming convention; domain - subdomain - environment e.g. mygov - www - live
- Select the type of property for which you intend to use the container for. In most instances you’ll select ‘web’
- Two code snippets will appear on screen, along with instructions on where to place them: place the code as instructed on all of your pages (this might require help from a developer)
- Repeat the previous 3 steps for any additional containers i.e. for test environments. Follow the same naming convention as your other container, e.g. ‘mygov.scot - www - test’
- Add the dataLayer snippet to your site (advanced). Here’s a guide on the dataLayer and here are instructions from Google on implementation for your developer.
Once GTM has been deployed to all pages, it lets you deploy your analytics tool/Google Analytics, enhanced tracking capability and any other tags where applicable, e.g. advertising floodlight tags/pixels, etc.
The Design System performance team have created a Google Tag Manager container which can be imported if you are building a site with the Design System. Download the Google Tag Manager container below. If you have an questions please contact the performance team.
If you are setting up your own event tracking we recommend adding document/download tracking, email link tracking and external link tracking.
Google Tag Manager - additional reading
- Simo Ahava: Some awesome google tag manager resources
- Optimize Smart: Google Tag Manager turorial 2021
- iPullRank: Complete guide to Google Tag Manager
- Digital Marketer: The Ultimate Guide to Google Tag Manager
- Google: Developer documentation for Google Tag Manager
- Google: Components of Google Tag Manager
- Optimize Smart: Google Tag Manager event tracking tutorial
- Simo Ahava: The Data Layer
- Optimize Smart: Google Tag Manager Data Layer tutorial
- Google: Developer documentation for Data Layer
Feedback, help and support
There is a problem
Thanks for your feedback