Rex

Set up Google Analytics (server-side)

This integration sends a purchase event straight from Rex's servers to Google Analytics 4 every time a booking is confirmed. Because it does not run in the guest's browser, ad blockers, tracking-prevention settings and abandoned tabs cannot stop it — so your revenue numbers in GA4 stop under-reporting.

ℹ️Note

This is not the same as Google Tag Manager. GTM fires events in the guest's browser through the data layer, and covers the whole funnel. This integration fires one event, purchase, from Rex's servers. Most venues run both.

Before you start

You need a GA4 property, and permission in it to create a Measurement Protocol API secret. Google Analytics is also a plan feature — if there is no Google Analytics card in your integration settings, your plan does not include it.

Should you use this, GTM, or both?

Run both, and Rex keeps them from double-counting. Rex sends the same identifier as the transaction ID from both the browser and the server, so GA4 recognises the two reports as one purchase and keeps a single conversion.

FieldDescription
Google Tag ManagerBrowser-side. Covers the whole funnel — page views, package selections, add-ons, checkout steps, purchase. Blockable.
Google Analytics (this article)Server-side. Sends purchase only, and cannot be blocked. Use it to make revenue reporting reliable.
💡Tip

If your GA4 revenue has always looked lower than your Rex reports, this is the setting that closes the gap.

Get your GA4 values

1

Copy your Measurement ID

In Google Analytics, open Admin, then Data Streams, and select your web stream. Copy the Measurement ID. It starts with G- followed by ten characters.

2

Create a Measurement Protocol API secret

On the same data stream, open Measurement Protocol API secrets and create a new secret. Copy the secret value — Google only shows it in full once.

⚠️Warning

Create the API secret on the same data stream as the Measurement ID you copied. A secret from a different stream is accepted by the form but every event will be rejected by Google.

Enter them in Rex

3

Fill in the Google Analytics card

Open Integrations from the Marketplace group in the sidebar, find the Google Analytics card, and paste both values in. This is account-wide — it applies to every venue.

MarketplaceIntegrations
FieldDescription
Measurement IDFormat: G-XXXXXXXXXX
API SecretMeasurement Protocol API secret from GA4 Admin → Data Streams
ℹ️Note

The API Secret is stored encrypted and masked once saved, so you will not be able to read it back. To change it, paste the new secret over the top.

4

Confirm it's working

Take a real booking, then open Reports and then Realtime in Google Analytics. The purchase event should appear within a couple of minutes, with the booking's value against it.

What Rex sends

One purchase event per confirmed booking, carrying the booking's value and currency, the reservation number, the package name, the guest count, any discount codes used, and the package as a single line item.

The booking's own reference is used as the transaction ID, which is what lets GA4 tie the server event to the browser one and keep a single purchase.

When the event does not fire

Rex deliberately skips the purchase event in these cases:

  • The reservation is not confirmed. Only paid, confirmed bookings are sent — pending and failed ones are not.
  • Either the Measurement ID or the API Secret is missing. Both are required.
  • The booking's net value works out below zero, which would otherwise report negative revenue to GA4.
  • Your plan does not include Google Analytics.

Troubleshooting

No purchase events in GA4 at all

Check both fields are filled in and that the Measurement ID starts with G-. Then confirm the API secret was created on the same data stream as that Measurement ID — a mismatched pair is the most common cause, and Google rejects the events silently.

Purchases are counted twice

Rex sends the same transaction ID from the browser and the server precisely so this does not happen. Double counting usually means a second purchase tag of your own is firing in GTM with a different transaction ID. Check for a custom purchase tag alongside the Rex one.

Revenue in GA4 still looks low

Confirm your GA4 tag is reading revenue from the right place — see the Google Tag Manager article for the exact data layer paths. A GA4 tag pointed at top-level fields instead of the ecommerce object records purchases with no revenue.

Some bookings are missing

Compare them against the list above. Unconfirmed bookings and zero-or-negative-value bookings are skipped by design, so a shortfall against your Rex reservation count is expected rather than a fault.

Updated Aug 25, 2026

Was this helpful?