Rex

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.

1

Go to Integrations

Navigate to Settings > Integrations.

Settingsβ€ΊIntegrations
2

Find GTM

Search for "Google Tag Manager" in the integrations list.

Settingsβ€ΊIntegrations
3

Enable GTM

Toggle the GTM integration on. Enter your GTM Container ID (format: GTM-XXXXXXX).

Settingsβ€ΊIntegrations
4

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.

Settingsβ€ΊIntegrations
5

Save

Click Save. GTM container loads on the booking page and data layer events begin firing.

Settingsβ€ΊIntegrations
6

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.

Settingsβ€ΊIntegrations

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.

FieldDescription
event"purchase" β€” the event name to trigger your purchase or conversion tags on. Top level.
ecommerce.valueThe order total, as a plain number (for example 120). This is the revenue GA4 attributes to the booking.
ecommerce.currencyThe three-letter currency code, for example USD.
ecommerce.transaction_idA unique reference for the transaction, used to de-duplicate the purchase in GA4.
ecommerce.itemsAn array with the booked package as a single item: item_id, item_name, item_category ("Reservation"), price, and quantity.
reservation_numberThe Rex reservation number. Top level.
package_nameThe name of the booked package. Top level.
guestsThe number of guests on the reservation. Top level.
discountsAn array of any coupon codes applied to the booking. Top level.
πŸ’‘Tip

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?