Google Tag Manager

MarketingIT / Technical

Google Tag Manager (GTM) lets you load your own tags on your booking page — for example, GA4 pageview tracking or remarketing audiences. It's optional and sits alongside Preb's built-in tracking, which already handles your Meta and Google Ads conversions for you.

When to use GTM

Reach for GTM when you want to run your own browser tags on the booking page that Preb doesn't manage — things like:

  • GA4 (Google Analytics 4) pageview and engagement tracking
  • Building remarketing / audience lists
  • Other third-party tags you manage centrally in your GTM container

You don't need GTM for Google Ads conversions

Your Google Ads conversion events — new leads, booked calls, and closed deals — are sent automatically through Preb's server-side integration. That doesn't rely on Tag Manager, so you can skip GTM entirely and your conversions still flow. See Google Ads.

Just want GA4? Skip GTM

If your only goal is Google Analytics 4, you don't need Tag Manager — paste your GA4 Measurement ID directly into Preb and we load Analytics for you, funnel step events included. See Google Analytics 4. Use GTM when you manage several tags centrally or already run GA4 through a container.

Booking conversions in your tags

Whenever a booking completes, Preb pushes a preb_booking_completed event into the browser dataLayer — on every booking, whether or not you use a post-booking redirect. Build a trigger on that event in your container to fire a GA4 conversion, a Google Ads remarketing tag, or anything else. The event carries the booking ID (preb_booking_uid) and the booker's email (preb_contact_email) so you can attribute it.

The same push carries the Preb funnel step events — preb_event_type_viewed, preb_form_started, preb_day_selected, and preb_time_selected — so you can measure drop-off inside your own analytics.

Every one of these events — the conversion included — also carries event_type_slug (e.g. discovery-call), event_name (the title) and event_type_id. Read them with a Data Layer Variable to segment your tags by offer, or to fire a different tag per event type from a single trigger.

Those three keys are also pushed into the dataLayer before your container loads, so they are available to every tag — including ones on the Page View / All Pages trigger, which fires before any Preb event. You don't need a separate container per booking link: one container plus a Data Layer Variable covers every event type, and new event types are covered automatically.

One toggle, redirects only

Your event type's confirmation settings include “Wait for tracking before redirecting.” It doesn't control whether the conversion fires — that always happens — it only holds a same-tab redirect for a moment so a fast pixel isn't lost as the page navigates away. Leave it off if you don't send bookers to an external page.

Adding your container ID

You add GTM on the Google Tag Manager page under Integrations.

Find your container ID

In Google Tag Manager, your container ID is in the top bar of your workspace. It looks like GTM-XXXXXXX.

Paste it into Preb

Go to Integrations → Google Tag Manager and paste it into the Container ID field.

Save settings

Click Save settings. The card shows "Installed" in the hub once it's set.

GTM is optional, so an empty field simply leaves the card uninstalled rather than warning you.

Your Tag Manager container loads on the booking page only for visitors who accept marketing cookies in the consent banner. Visitors who decline won't load your container, which keeps you on the right side of privacy rules.

This is the same consent gate that controls the in-browser Meta Pixel — see Consent & cookie banner for how it works and how to manage the banner.

Verified in Preb

Once a visitor accepts cookies on your booking page and the GTM script initialises, the card under Integrations switches from Set up to Verified and shows when it last happened. If it stays on Set up, the id is not loading — check it against the one in your Google account.

Verifying

To confirm your container is firing:

Open your live booking page

Visit one of your event's public booking pages in a normal browser window.

Accept marketing cookies

Accept marketing cookies in the consent banner — the container won't load until you do.

Check in Google Tag Manager Preview

Use GTM's built-in Preview mode (or your browser's developer tools) to confirm the container and your tags are loading.

Test the no-consent case too

Decline cookies on a fresh visit and confirm your container does not load. That's the behaviour you want — it proves visitors who opt out aren't being tracked.

Embedded widget on your own site?

Inside an embed, this event is pushed into the widget's own frame — your page's tag doesn't see it directly. Forward it with window.Preb.on('preb_booking_completed', …); see Tracking inside embeds.