A hotelier's guide to Google Tag Manager (GTM)
Tag Manager is where your website, booking engine, consent banner and ad platforms meet. How it works, how to track bookings and how to clean it up.
Google Tag Manager was sold to hotel marketers as a way round the developer. Add a tag yourself, publish it yourself, no ticket and no wait. That freedom is the reason most hotel containers I open are a mess.
Google Tag Manager (GTM) is a free Google tool that loads every tracking and marketing script on your website from a single container. You add one snippet to the site once. From then on, tags for GA4, Google Ads, Meta, metasearch and affiliates are added, changed and removed in Tag Manager, not in the website's code.
For a hotel, that container is where the website, booking engine, consent banner and ad platforms meet. If it is wrong, every report built on it is wrong, and so is every budget decision made from them.
What Tag Manager does
Everything in a container is built from three parts. It is how we build tracking in the Growth Marketing practice, and worth understanding even if someone else does the building.
Tags, triggers and variables
- Tags. The what. A piece of code that sends something somewhere, such as a GA4 event, a Google Ads conversion or a Meta purchase.
- Triggers. The when. The condition that fires a tag, such as every page view, a click on the phone number or the booking engine reporting a purchase.
- Variables. The stored values. Information a tag or trigger can use, such as the booking value, the currency, the room name or your GA4 measurement ID.
The Google tag sits at the centre of most containers. It replaced the GA4 Configuration tag in September 2023 and can serve GA4 and Google Ads together. Tags with UA- tracking IDs and category, action and label events belong to Universal Analytics, which Google has switched off. If your container still has them, they are dead weight.
Versions, preview and workspaces
Nothing reaches the website until you publish it. Preview opens your site connected to Tag Assistant, which shows every tag that fired, in what order and with what data. Each publish saves a version, so a bad change can be rolled back in a few clicks.
Workspaces let several people edit at once, up to three on the free version.
Treat publishing like a website release, because that is what it is. A live tag has the same reach as code a developer deployed.
Why hotels still need it
The reasons we gave for Tag Manager in 2017 mostly still hold. A hotel website carries tags from several vendors, and Tag Manager keeps them in one place, with one history and one set of consent rules. Adding a metasearch conversion does not need a website release.
The bigger reason is reuse. One trigger, such as a completed booking, fires tags for GA4, Google Ads and Meta at the same moment, from the same data. Without it, each is a separate script reading the booking its own way.
The speed argument needs more care. Tag Manager loads asynchronously, so it does not stop the page drawing. But every tag it loads still runs in the guest's browser, and a container full of custom HTML and duplicate pixels slows a site as surely as hard-coded scripts.
What has changed is who should be adding tags. The promise was that anyone in marketing could. In practice, agencies come and go, each adding tags and none removing them.
The data layer does the work
The data layer is a list of facts the website or booking engine hands to Tag Manager as things happen. A guest searches for dates, and the booking engine pushes an availability search event with the dates, guests and property. A guest pays, and it pushes a purchase with the value, currency and booking reference.
That data layer push is the booking engine saying to Tag Manager, this is what's just happened.
Harry Fielder, CEO, Umi
Triggers built on those events are far more reliable than the alternatives. The 2019 version of this guide tracked a click by the ID of a button, which works until someone redesigns the button. A trigger that waits for the booking engine to report a purchase does not care what the page looks like.
Most hotel booking engines already push a data layer, often using GA4's ecommerce event names. Ask your provider for their data layer documentation before you build anything, so you know which events exist and what each one carries. Which of them deserve tracking, and which should be key events, is in our guide to GA4 key events.
Build from the data layer, not from the page. If the booking engine does not push what you need, ask them to add it rather than scraping the URL.
Tracking the booking engine
Most hotel bookings complete on a booking engine you do not control, and that is where most containers go wrong.
Getting the container onto it
The booking engine needs to load a Tag Manager container, ideally the same one as your website. Most providers take a container ID in their settings or add it on request. Some supply a ready-made container file to import, a sensible start that still needs checking against your own accounts and consent.
If it runs its own container with its own tags, you have two sets of rules to keep in step, and bookings go missing in the gaps.
The purchase tags
Each platform needs its own purchase tag, fired by the same trigger.
- GA4. A purchase event with the full ecommerce data, so GA4 knows what was booked.
- Google Ads. A conversion tag with value, currency and transaction ID. Google Ads needs the fact of the booking and its value, nothing more.
- Meta. A purchase event with value and currency. A blank currency field can stop the revenue arriving.
The transaction ID stops a reloaded confirmation page counting twice. In one container I looked at this summer, Google Ads had a begin checkout conversion and no purchase conversion at all, so paid search was judged on guests who started booking, not those who finished.
Linking the two domains
The conversion linker tag must fire on the booking engine as well as the website, or Google Ads loses the click that brought the guest. Carrying the GA4 session across domains is set up in the Google tag and covered in the GA4 guide.
Consent inside the container
Tag Manager is also where consent is enforced, or not. Google has required Consent Mode v2 for UK and EEA users' data since March 2024, and the container is where the banner's answer reaches each tag.
Three settings matter. The Consent Initialization trigger fires before any other, so the default consent state is set before any tag runs. Google's own tags have built-in consent checks and adjust to the guest's choice automatically. Every other tag, from Meta to affiliates, needs additional consent set so it only fires once that consent is granted.
The Consent Overview screen shows every tag's setting in one place. In one hotel group's container we audited this year, 103 of 105 tags were marked as needing no additional consent. For Google's tags that is defensible. The rest fired for every guest, whatever they had chosen.
Google's guide to consent in Tag Manager covers each setting.
The banner itself, and the law behind it, are in our guide to the cookieless web for hotels.
Cleaning up a container
Containers are rarely built. They accumulate. Every agency, booking engine change and campaign left something behind.
Sometimes it is quicker to start again. For one hotel group this year we built a new container from scratch rather than patch the old one, so it could be tested against real bookings before it went live. For most hotels, a methodical clean-up is enough.
- List what is there. Note every tag, what it is for, who added it and whether anyone still uses that platform.
- Remove what is dead. Delete paused tags, Universal Analytics tags, pixels for platforms you no longer pay for and duplicates.
- Set one source for each ID. Store the GA4 measurement ID and each conversion ID once, as a variable, so a change in one place changes everywhere.
- Name and folder everything. Use one pattern, such as platform then event, so the next person can read the container without you.
- Put consent on every tag. Work through the Consent Overview until every non-Google tag waits for the consent it needs.
- Test with a real booking. Book in Preview, check each purchase tag fired once with the right value, then publish with a note saying what changed.
A clean container is also the starting point for server-side tracking, which carries whatever the container gives it, broken or not.
One request to put to whoever runs your container this week. Ask for the list of users who can publish, and the notes on the last ten versions. If the list includes people who left years ago and the notes are blank, start there.
Questions hotels ask
Yes. The standard version of Google Tag Manager is free for any website. Tag Manager 360, part of Google Marketing Platform, is paid and adds features such as unlimited workspaces and approval workflows for larger organisations.
Only to add the container snippet to the website once, and to get the booking engine to load the container and push a data layer. After that, tags can be added and changed in Tag Manager. Changes should still be tested in Preview and published with care, because they run on the live site.
The container itself loads asynchronously and has little effect on its own. What slows a site is what the container loads. Dozens of tags, custom HTML scripts and duplicate pixels add weight, so a tidy container is a faster one.
Yes, if the booking engine loads your container and pushes booking events, such as purchase, to the data layer. Ask your provider whether they support a Tag Manager container ID and for their data layer documentation. Without both, bookings on their domain are largely invisible to your tags.
The Google tag is a single piece of code that sends data to GA4 and Google Ads. Google Tag Manager is the tool that manages all your tags, including the Google tag, alongside non-Google tags such as Meta. Most hotels use the Google tag inside Tag Manager rather than on its own.