The Google Analytics 4 (GA4) integration sends e-commerce events from your booking site directly to your GA4 property. Track purchases, checkout flows, cart interactions, and customer behavior alongside the rest of your website analytics.
Getting started
Navigate to Settings > Company groups, open the group, switch to the Integrations tab, and click Configure integration on the Google Analytics 4 card.
How it works
The configuration view has three configuration controls plus a code snippet for embedded booking pages.
| Element | Notes |
|---|---|
| Measurement ID | Your GA4 property's measurement identifier (starts with G-) |
| Active | Toggle that enables GA4 tracking |
| Send full cart amount to GA | Toggle that controls whether purchase events report the full cart total or only the amount actually collected (e.g., the deposit) |
| Embedded iframe code snippet | A copy-able code block you paste into your parent site if your booking page is iframe-embedded |
When Active is on and the Measurement ID is set, your booking site fires standard e-commerce events to GA4 as customers browse, add to cart, start checkout, and complete purchase.
Step-by-step guide
Find your Measurement ID
| Step | Action |
|---|---|
| 1 | Open Google Analytics and pick your GA4 property |
| 2 | Go to Admin > Data Streams |
| 3 | Open the web data stream for your booking site domain |
| 4 | Copy the Measurement ID at the top right (starts with G-) |
Configure the integration
| Step | Action |
|---|---|
| 1 | Paste the ID into the Measurement ID field |
| 2 | Toggle Active on |
| 3 | Pick the Send full cart amount to GA behavior (see below) |
| 4 | Click Save at the bottom of the tab |
The cart-amount toggle decides what value the purchase event reports.
| Toggle state | What's reported |
|---|---|
| On | The full cart total, regardless of how much the customer actually paid |
| Off | The amount due at the moment of purchase. For deposit and pay-on-arrival flows, this is the deposit only |
Pick on for total revenue tracking; pick off if you only want GA4 to see actual collected revenue at the time of checkout.
Set up for embedded booking pages
Already using the embed code from your Booking site template? You can skip this section. The embed snippet generated by your Booking site template already includes the postMessage handler, so events flow through to your parent site's GA4 automatically. You only need the standalone snippet below when you've embedded the booking page some other way (a hand-rolled iframe, a CMS embed widget, etc.).
If you embedded the booking page using your own iframe code, GA4 events from inside the iframe can't directly reach your parent site's GA4 property. The integration ships with a separate code snippet that bridges the gap by listening for postMessage events from the iframe and forwarding them to GA4 on the parent domain.
| Step | Action |
|---|---|
| 1 | In the GA4 configuration view, find the embedded iframe code snippet (rendered in a code block) |
| 2 | Click the copy icon next to the snippet |
| 3 | Paste the snippet into your parent site's code, on the page that contains the booking iframe |
| 4 | Confirm GA4 is also loaded on your parent site (it has to be, for the events to land somewhere) |
The snippet runs on every booking interaction inside the iframe and reports it as a GA4 event on the parent domain.
Verify with GA4 Realtime
| Step | Action |
|---|---|
| 1 | In Google Analytics, open Reports > Realtime |
| 2 | Open your booking site in another tab and complete a test action (browse to an event, add to cart, attempt checkout) |
| 3 | Watch Realtime for events firing in the last few minutes |
If events don't appear, check the Measurement ID, the Active toggle, and (for embedded sites) that the iframe code snippet is on the parent page and GA4 is loaded there.
Reference
Configuration view
| Element | Description |
|---|---|
| Measurement ID | Text input. Format: G-XXXXXXXXXX |
| Active | Toggle to enable or disable GA4 tracking |
| Embedded iframe note | Text: "When embedding the booking page in an iframe, it's necessary for your site to handle the analytics events. We provide these events to the parent domain using postMessage. You will need to implement code to capture and manage these events accordingly. Below is example code snipped you can include:" |
| Embedded iframe code snippet | Code block with a copy button |
| Send full cart amount to GA | Toggle. Tooltip: "When enabled, the cart total amount will be sent to GA during customer checkout. Otherwise, it will send the due amount as determined by deposit or pay on arrival configurations." |
| Cancel | Discards changes |
| Save | Commits the Measurement ID, Active, and toggle |
Send full cart amount to GA
| State | Behavior |
|---|---|
| On | Purchase events report the full cart total |
| Off | Purchase events report only the amount due (deposit, pay-on-arrival amount) |
Where to find the Measurement ID
| Source | Path |
|---|---|
| Google Analytics | Admin → Data Streams → your web stream → Measurement ID |
Good to know
- GA4 events fire on customer-facing actions (page view, add to cart, begin checkout, purchase). Internal admin actions don't fire GA4 events.
- Per-group configuration. Each location can have its own Measurement ID, so reports cleanly separate by venue.
- GA4 needs a few minutes to surface events in standard reports. Use Realtime for live verification during setup.
- The full-cart-amount toggle is important for revenue dashboards. If your business runs deposit-heavy bookings, the off state under-reports total revenue (you only see deposits, not the eventual full amount). The on state over-reports collected revenue (you see the full cart even if most of it is paid later). Pick the one that matches what your reporting team expects.
- Iframe embed needs both halves. The snippet on the parent page does nothing on its own; GA4 must also be loaded on the parent. If you don't already track the parent in GA4, set that up first.
- The Booking site template embed code already includes the postMessage handler. If you grabbed the embed code from Booking site settings, you don't need the separate snippet from this page. The standalone snippet is only for hand-rolled iframe embeds.
- GTM + GA4 together is fine. If you're using Google Tag Manager with our pre-configured template, the template already sends events to GA4. The standalone GA4 integration adds direct tracking on top, which can produce duplicate events. Use one or the other for cleaner data.
- Active off pauses tracking without losing the Measurement ID or the toggle states.
FAQ
Q: Should I use GA4 directly or through Google Tag Manager?
A: If you only need basic analytics, the direct GA4 integration is simpler — paste in your Measurement ID and you're done. If you need to manage multiple tracking tags or want more event-firing control, use GTM with our pre-configured template. The template sends events to GA4 via the Measurement ID variable.
Q: What events are sent to GA4?
A: Standard e-commerce events: page view, add to cart, begin checkout, and purchase. Each event includes currency and value data automatically.
Q: Do I need the iframe snippet if my booking page is on a subdomain?
A: No. The iframe snippet is only needed when the booking page is embedded within another page using an iframe. If customers visit the booking page directly — even on a subdomain — events fire normally without the snippet.
Q: I already pasted the embed code from my Booking site template. Do I also need the iframe snippet from this page?
A: No. The embed code generated by your Booking site template already includes the postMessage handler that forwards GA4 events to the parent. The standalone snippet on this page is only for cases where you've embedded the booking page using your own hand-rolled iframe.
Q: My GA4 events aren't appearing. What should I check?
A: 1) Confirm the Measurement ID exactly matches GA4 (typo-prone). 2) Confirm Active is on. 3) Open Realtime in GA4 and test in another tab. 4) For iframe embeds, confirm the snippet is on the parent page AND GA4 is loaded there. 5) Disable browser ad blockers that might suppress GA4 calls.
Q: I see duplicate events in GA4. Why?
A: Likely both the GA4 integration and the GTM integration are firing events to the same property. Pick one method: turn off the GA4 integration if GTM is handling tracking, or remove the GA4 tag from your GTM container if you're using the direct GA4 integration.
Q: Can I track which event a customer booked from a Facebook ad?
A: GA4 attribution shows the source for each conversion. For more direct attribution in your own reporting, use UTM source tracking and tag your Facebook ad URLs with utm_source=facebook.
Q: What's the right setting for "Send full cart amount" with deposit bookings?
A: Most teams want on so GA4 reports total committed revenue, not just the deposit. The deposit is a billing implementation detail; the cart total is what the customer agreed to pay. But this depends on what your reporting team expects, so confirm before changing it.
Q: Can I exclude certain events from GA4?
A: Not from this integration directly — events fire on a fixed set. To filter or customize events, use Google Tag Manager instead, which lets you choose which events to forward.