Google Tag Manager
Google Tag Manager (GTM) is tag management system that allows us to set up and manage tags on our sites without changing the website’s code. It is designed to enable quick updates to website tracking, as tracking can be managed by easily configured tags within GTM.
GTM is used on a number of GDS-owned sites to send data to Google Analytics 4.
If you require a new GTM container for your site, need any help using GTM, please contact the Analytics team.
GOV.UK GTM
Google Tag Manager (GTM) is used on www.gov.uk to send data to Google Analytics 4.
The deployment and administration of GTM on GOV.UK is owned by the GOV.UK Analytics team.
See the GTM change process for details on the process for making changes in GTM.
Configuration
We use one container with multiple environments to cover the integration, staging and production or live GOV.UK sites.
Access
Read access is granted to Performance Analysts to allow for debugging and checking analytics data.
Edit access is limited to those who need it for development and debugging. This will be Performance Analysts in the Analytics team.
Publish access is limited to developers activily working on Analytics and those who cover support, as well as certain Performance Analysts in the Analytics team.
Note that Approve and Publish permissions can not be assigned to groups, only individuals.
We are happy to share a copy of our GOV.UK GTM container with any interested public servants. Please get in touch with the GOV.UK Analytics team who will be able to grant you access in GTM or send you a copy of the JSON file.
Restrictions
The GOV.UK analytics JavaScript has been implemented so that no analytics code is run until users consent to cookies. This includes calling the GA4/GTM script from Google.
This JavaScript also implements a blocklist when initialising Google Tag Manager. This prevents various items from being deployed from GTM, such as custom scripts and HTML.
GOV.UK Publishing GTM
GTM is used across the Publishing apps to send data to Google Analytics 4.
Configuration
Two containers are used to cover all Publishing apps - one for apps using the Design System, and one for apps built using Bootstrap. Each container has two environments to cover integration and production.
Access
Access is limited to analysts and developers working on the Publishing apps.