Every time you want to add new tracking to your hotel website — a Facebook Pixel, a Google Ads conversion tag, a heatmap tool, a GA4 event — you have two options. You can contact your web developer, wait for them to update the site, and then test the change. Or you can do it yourself in five minutes using Google Tag Manager.
GTM is a free tag management system that sits between your hotel website and every third-party tool you use. Once the GTM container is installed on your site (a one-time job), you can add, edit, and remove any tracking code without touching the website again.
How GTM Works: Tags, Triggers, and Variables
Tags: Pieces of code that run on your website — your GA4 base tag, a Google Ads conversion tag, a Meta Pixel, a Hotjar tracking code, or any custom JavaScript.
Triggers: Rules that determine when a tag fires. A trigger might be “when any page loads”, “when a user clicks a button with the text Book Now”, or “when the URL contains /booking-confirmed”.
Variables: Dynamic values that tags and triggers use — the URL of the current page, the text of a clicked element, or a value from your booking engine confirmation.
The power comes from combining these three. A tag (Google Ads conversion) fires when a trigger (page URL contains /booking-confirmed) is true, using a variable (booking value from the page) to pass the revenue amount.
Step 1: Create Your GTM Account and Container
- Go to tagmanager.google.com and sign in
- Click “Create Account”, enter your company name, and select your country
- Create a Container: enter your website URL and select “Web”
- Accept the terms of service
- GTM will show you two code snippets — copy both
The first snippet goes in the
section of every page. The second goes immediately after the opening tag. Your web developer installs these once. After that, you manage everything in GTM.
Step 2: Add Your GA4 Configuration Tag
- In GTM, click “New Tag”
- Select “Google Analytics: GA4 Configuration”
- Enter your GA4 Measurement ID (G-XXXXXXXXXX)
- Under “Triggering”, select “All Pages”
- Name the tag “GA4 — Configuration” and save
Publish and verify in GA4’s DebugView that pageview events are appearing.
→ Example: A hotel group with four properties uses one GTM container per property, each with its own GA4 configuration tag pointing to a separate GA4 property. This gives them both individual property data and the ability to roll up reporting across the group.
Step 3: Track Booking Engine Clicks
Setting Up a Click Trigger
- In GTM, go to Triggers → New
- Select “Click — All Elements”
- Choose “Some Clicks” and set the condition: Click Text contains “Book” OR Click Text contains “Check Availability” OR Click URL contains “/booking”
- Name the trigger “Click — Booking CTA” and save
Creating the GA4 Event Tag
- Go to Tags → New → Google Analytics: GA4 Event
- Select your GA4 configuration tag
- Set Event Name to “booking_engine_start”
- Add Event Parameters: page_location (use the built-in variable {{Page URL}})
- Set Trigger to “Click — Booking CTA”
- Name and save the tag
Use GTM’s Preview mode to test: open your hotel website in Preview mode, click your Book Now button, and confirm the tag fires in the GTM debug panel.
Step 4: Track Booking Confirmations
If Your Booking Engine Has a Confirmation Page URL
- Create a new Trigger: type “Page View”, condition “Page URL contains /confirmed”
- Create a GA4 Event tag: event name “booking_complete”
- Add parameters: transaction_id (if available), value (booking total), currency
- Set trigger to the confirmation page trigger
If Your Booking Engine Is a Third-Party iFrame
iFrame booking engines cannot be tracked with standard GTM triggers. Options include: asking your booking engine provider for their GA4 integration guide, using postMessage communication between the iFrame and parent page, or tracking the email confirmation receipt as a proxy conversion.
Step 5: Install Your Marketing Tags
Meta Pixel (Facebook/Instagram Ads)
- In GTM, go to Tags → New → Custom HTML
- Paste your Meta Pixel base code
- Set trigger to “All Pages”
- Add a second tag with the Meta Pixel purchase event, triggered by your booking confirmation page
Google Ads Remarketing
- In GTM, go to Tags → New → Google Ads Remarketing
- Enter your Google Ads Conversion ID
- Set trigger to “All Pages” to build a remarketing audience of all hotel website visitors
GTM Best Practices for Hotels
- Always use Preview mode before publishing — a broken tag can corrupt your data for days before you notice
- Name tags, triggers, and variables consistently: “GA4 — Event — [EventName]”, “Trigger — [Description]”
- Use GTM’s built-in version control — publish a new version for every significant change and add notes explaining what changed
- Set up User Permissions to give agency partners access to specific containers only, not your entire GTM account
- Review the GTM container quarterly and remove any tags that are no longer in use
Need GTM set up properly so every booking touchpoint is tracked?
The Lobby installs and configures Google Tag Manager for independent hotels — no developer required.
Book a Free GTM Consultation
Related Reading