Set up Google Tag Manager
Google Tag Manager lets you deploy marketing and analytics tags on your booking pages without code changes. Rex pushes data layer events to GTM for you to use in tag triggers.
Go to Integrations
Navigate to Settings > Integrations.
Find GTM
Search for "Google Tag Manager" in the integrations list.
Enable GTM
Toggle the GTM integration on. Enter your GTM Container ID (format: GTM-XXXXXXX).
Select tracking events
Choose which booking page events to push to the data layer: Page Visited, Reservation Confirmed, Package Card Expanded, Time On Package Selected, Add Ons Page Visited, Add On Selected.
Save
Click Save. GTM container loads on the booking page and data layer events begin firing.
Set up tags in GTM
In Google Tag Manager, create triggers based on the data layer events (e.g. event: "purchase") to fire GA4, Meta Pixel, or other tags.
Understand the Reservation Confirmed data layer
When a booking completes, Rex pushes a purchase event to the data layer. The revenue fields sit inside an ecommerce object so Google Analytics 4's standard Ecommerce Purchase tag can read them automatically. A few descriptive fields sit at the top level. When you build your own GA4 tag, your Data Layer Variables must point at the exact paths below.
| Field | Description |
|---|---|
| event | "purchase" β the event name to trigger your purchase or conversion tags on. Top level. |
| ecommerce.value | The order total, as a plain number (for example 120). This is the revenue GA4 attributes to the booking. |
| ecommerce.currency | The three-letter currency code, for example USD. |
| ecommerce.transaction_id | A unique reference for the transaction, used to de-duplicate the purchase in GA4. |
| ecommerce.items | An array with the booked package as a single item: item_id, item_name, item_category ("Reservation"), price, and quantity. |
| reservation_number | The Rex reservation number. Top level. |
| package_name | The name of the booked package. Top level. |
| guests | The number of guests on the reservation. Top level. |
| discounts | An array of any coupon codes applied to the booking. Top level. |
In a custom GA4 event tag, set your Data Layer Variables to ecommerce.value, ecommerce.currency, and ecommerce.transaction_id β not top-level value, currency, or transaction_id. Pointing them at the top level returns empty, so GA4 records the purchase with no revenue. Or use GA4's built-in Ecommerce Purchase tag, which reads the whole ecommerce object for you.
Updated Aug 3, 2026
Was this helpful?