Xola · GA4 and Google Tag Manager

Xola GA4 purchase tracking with Google Tag Manager

For Xola operators and the freelancers who help them. How Xola's checkout passes bookings to GA4, the exact Google Tag Manager setup Xola documents, and how to prove a purchase arrives with the right value.

Last reviewed November 1, 2026. Checked against Xola's help center and developer hub, and Google's Analytics and Tag Manager documentation.

Short answer

Xola GA4 purchase tracking works through Google Tag Manager: Xola's checkout pushes Google's standard ecommerce events (view_item, add_to_cart, add_payment_info, purchase) into a data layer, and your GTM container turns them into GA4 events. You need the Xola checkout JavaScript in your site's head, drawer (pop-up) or embedded buttons, one GA4 Event tag with "Send Ecommerce data" on a Custom Event trigger for those event names, and your GTM container ID entered in Xola under Marketing, Conversion Tracking, Google Tag Manager. Then add Xola's checkout domains to GA4's cross-domain list and confirm a test booking in GTM Preview and GA4 DebugView.

How Xola's checkout connects to your site

Xola's booking flow is a checkout window that Xola's own JavaScript opens on top of your page or embeds inside it. You install one script once, from Settings, Button Code, Step 1 in Xola, and then paste button code wherever you want a Book Now button. Xola's developer guide to the JavaScript widget shows the same pattern: one script include that loads checkout.js, and a div with the class xola-checkout and your seller and experience IDs.

The Xola button installation article lists three code types for each button:

  • Drawer Code: opens checkout in a sliding panel overlay.
  • Embedded: embeds the checkout directly on your page.
  • Link: a URL that opens checkout in a new tab. Xola notes that URL checkout "will not track Google Analytics" if the Xola JavaScript is not installed.

This matters for tags because the checkout itself runs on Xola's domains. Xola's Google Analytics 4 help article asks you to list checkout.xola.app and checkout.xola.com alongside your own domain in GA4, and says the GA4 integration "must occur within the checkout iframe for accurate tracking". Your GA4 tag on your own pages cannot read what happens inside that checkout by itself. Xola bridges the gap with a data layer: as the guest moves through checkout, Xola passes the booking steps as ecommerce events that your Google Tag Manager container can listen for.

Xola describes this as client-side tracking: the events are captured in the guest's browser and sent to Google, so ad blockers and browser privacy settings can stop some of them. That is true of any browser tag, and it is one reason GA4 will not match your Xola reports one to one. Our booking tracking hub explains the same pattern across other booking platforms.

Plan differences

Xola's help center does not describe plan tiers for GA4 or Google Tag Manager, and Xola's pricing page says customers "access every feature Xola offers". What does differ is access: Xola says only users with the Administrator or Marketer role can set up GA4 in Xola.

What Xola supports for GA4

Xola's documentation describes one route for GA4: your own Google tag plus Xola's data layer events, captured with Google Tag Manager or with gtag.js. Xola says "Conversions and revenue data are sent directly from Xola's checkout into GA4 using either gtag.js or GTM."

OptionWhat Xola documents
Native GA4 measurement ID field in XolaNot documented. The documented field is for a GTM container ID.
GTM container ID fieldMarketing, Conversion Tracking, Google Tag Manager. Xola says it "ensures both mobile and desktop checkout load the GTM container correctly".
Data layer eventsview_item, view_item_list, add_to_cart, add_payment_info, purchase, plus Xola's own xola_user_properties.
gtag.js on the siteSupported as an alternative to GTM. Xola asks you to remove duplicate gtag.js scripts if GTM manages your tags.
Custom script on purchaseXola's Custom Conversion Tracking feature runs your own script in checkout when a purchase completes. It is aimed at third-party tools, not at GA4 setup.

We recommend the GTM route, because it is the one Xola documents step by step, and the same events can then feed your Google Ads and other tags from one place.

What the documentation does not say

Xola says it uses Google's standard ecommerce events, but its help center does not publish the exact payload: which keys hold the transaction ID, value, currency and items, or what xola_user_properties contains. It also does not say in detail how the events reach your container on desktop versus on phones. Treat the payload as something to read in GTM Preview (see the verification steps below), not something to assume.

Before you start

  1. Install the Xola checkout JavaScript. In Xola, go to Settings, Button Code and copy the Step 1 code. Xola's GA4 article asks you to place it as close to the top of your site's <head> as possible; the button installation article says it should be the last piece of code in the head. Either way, it belongs in the head on every page that shows a Book Now button.
  2. Use drawer or embedded buttons. Xola's GA4 troubleshooting article says the two button types that work with conversion tracking are Pop-Up Checkout and Embedded Checkout. Link buttons only work for tracking when the Xola JavaScript is on the page.
  3. Paste button code directly into your page's HTML. Xola advises against website builder plugins that load buttons inside iframes, because conversions may not be captured.
  4. Install Google Tag Manager in the head. Xola's troubleshooting article says the tracking code must sit between <head> and </head>, with GTM's <noscript> part in the body.
  5. Remove duplicates. If GTM manages your tags, remove any separately pasted gtag.js snippet for the same GA4 property, and remove old Universal Analytics scripts. Xola lists both as causes of revenue and conversion discrepancies.
  6. Have a GA4 web data stream. You need its Measurement ID (it starts with G-) and a Google tag for it in your GTM container, firing on all pages.

Set up the GA4 ecommerce tag in Google Tag Manager

This follows Xola's own recipe from its GA4 article, with the event name field filled in the way Google's GA4 ecommerce guide for Tag Manager describes.

1. Create the trigger

  1. In GTM, go to Triggers, New, Trigger Configuration and choose Custom Event.
  2. In Event name, paste the regex below and tick Use regex matching. Google's Custom Event trigger help describes this option.
  3. Leave it on All Custom Events and save it as something like "Xola ecommerce events".

Regular expression

view_item|view_item_list|add_to_cart|add_payment_info|purchase

Xola also offers a longer version that includes its user properties event. Xola explains that the user properties event "won't be picked up automatically from the confirmation page", so adding it to the trigger helps capture those properties if you need them:

Regular expression

view_item|view_item_list|add_to_cart|add_payment_info|purchase|xola_user_properties

2. Create the GA4 Event tag

Google Tag Manager setting

Tag type: Google Analytics: GA4 Event
Measurement ID: G-XXXXXXXXXX (your own GA4 web stream)
Event Name: {{Event}}
More Settings, Ecommerce: Send Ecommerce data = on
Data Source: Data Layer
Triggering: Xola ecommerce events (the Custom Event trigger above)

Using the built-in {{Event}} variable means one tag sends each Xola event to GA4 under its own name, so purchase arrives as purchase. Google's built-in variables reference describes {{Event}} as the name of the current data layer event. If it is not listed in your variables, enable it under Variables, Configure.

3. Add your container ID in Xola

  1. Publish the GTM container (Submit, then Publish).
  2. In Xola, go to Marketing, Conversion Tracking, Google Tag Manager.
  3. Enter your GTM container ID (it looks like GTM-XXXXXXX) and save.

Xola says this setting makes "both mobile and desktop checkout load the GTM container correctly". We suggest entering the same container that runs on your website, so the same tags and triggers apply wherever the checkout runs.

What the platform sends and what you map

Xola supplies the event names and the ecommerce data. You supply the tag, the trigger, the Measurement ID and the container ID. For reference, this is Google's recommended GA4 purchase format for Tag Manager. It is Google's example, not a copy of Xola's payload, and you do not paste it anywhere: Xola pushes its own version.

JavaScript

// Google's recommended GA4 purchase format (example values).
// Xola pushes its own purchase event; compare it with this in GTM Preview.
dataLayer.push({ ecommerce: null });
dataLayer.push({
  event: "purchase",
  ecommerce: {
    transaction_id: "T_12345",
    value: 129.00,
    currency: "USD",
    items: [
      {
        item_id: "EXPERIENCE_ID",
        item_name: "Sunset Kayak Tour",
        price: 64.50,
        quantity: 2
      }
    ]
  }
});

Google's recommended events reference lists transaction_id, value, currency and items for purchase, and says currency is required for revenue metrics when value is set. When you test, check that Xola's purchase carries all four.

Cross-domain and unwanted referrals in GA4

Because the checkout runs on Xola's domains, GA4 needs to know those domains belong to the same journey as your site. Otherwise a purchase can be credited to a referral or a new session instead of the ad or search visit that started it.

  1. In GA4, go to Admin, Data streams, select your web stream, then Configure tag settings, Configure your domains. Google's cross-domain measurement guide describes this screen.
  2. Add conditions with match type Contains for checkout.xola.app, checkout.xola.com and your own domain, as Xola's GA4 article lists. Xola's troubleshooting article lists the broader xola.com and xola.app; a Contains condition on those also covers the checkout subdomains.
  3. Save.
  4. If you still see your own domain or Xola as a referral source after a few days, go back to Configure tag settings, Show all, List unwanted referrals and add the same domains, as Xola's troubleshooting article suggests. Google's unwanted referrals guide explains that matching events are then not reported as referrals.

Google's cross-domain guide also says every domain in the setup must use the same Google tag ID from the same web data stream. Entering the same GTM container in Xola as on your site keeps that true.

Mark purchase as a key event

GA4 marks purchase as a key event by default, according to Google's key events help. Confirm it once Xola's first purchase arrives: in GA4, go to Admin, Data display, Events, find purchase and check that the star is filled. A key event is what you later import into Google Ads, covered in our Xola Google Ads conversion guide.

Do not mark add_payment_info or add_to_cart as key events if you plan to use key events for ad bidding. They are useful for funnel reports, but they are not bookings.

Verify a purchase end to end

Xola's help center does not describe a test or sandbox booking mode, so use a real booking for a low-priced experience, then refund it.

  1. In GTM, click Preview, enter your website address and connect. Google's preview and debug guide covers this. Google's Tag Assistant troubleshooting page says tags loaded in iframes can only be debugged when the Tag Assistant Chrome extension is also installed, so install it before you start.
  2. On your site, click a drawer or embedded Xola button and book the cheapest option with a real card.
  3. In Tag Assistant, watch the event list on the left. You should see view_item, add_to_cart, add_payment_info and purchase appear as you move through checkout, with your GA4 Event tag under Tags Fired for each.
  4. Click the purchase event and open the Data Layer view. Note the exact keys Xola sends for transaction ID, value, currency and items. You need these names for Google Ads and for any Data Layer Variables.
  5. In GA4, open Admin, Data display, DebugView. Google's DebugView guide says Tag Assistant preview turns on debug mode. Click the purchase event and check transaction_id, value, currency and the items.
  6. Repeat the booking on a phone, then open GA4's Realtime report, which shows the last 30 minutes, and look for purchase in the event count card. Xola's troubleshooting article treats desktop and mobile separately, so a setup that works on one can still miss the other.
  7. Refund the test in Xola: Purchases tab, open the booking, Refund, then "Reduce booking value and return payment", as Xola's refund article describes. Xola does not document sending a GA4 refund event, so the test purchase stays in GA4; keep it small and note its transaction ID.

If you prefer to inspect the data layer directly, open Chrome DevTools, choose the checkout frame in the JavaScript context drop-down of the Console (described in Chrome's Console features reference) and type dataLayer. Check the top page's context as well, since Xola does not document which page holds the events.

A day later, compare GA4 with Xola's own numbers the way Xola suggests: in GA4, Reports, Monetization, Ecommerce purchases; in Xola, Reports, Custom Reports, Reservations, with the date range one day earlier than GA4, Source filtered to Checkout and Rescue bookings excluded.

Common problems

  • No Xola events in Preview at all. Check that the checkout JavaScript is in the head (search the page source for checkout.js, as Xola's troubleshooting article suggests) and that the button is a drawer or embedded button, not a plain link opened by a plugin.
  • Events appear but no GA4 tag fires. The trigger regex has a typo, or Use regex matching is off.
  • Desktop purchases are low but mobile looks right. Xola's troubleshooting article points to the ecommerce events in GTM for this pattern. If both are low, it points to the GTM container itself.
  • Purchases counted twice. Check for a hard-coded gtag.js plus a GTM tag for the same GA4 property, which Xola warns about.
  • Purchases credited to referral or direct. Revisit the cross-domain and unwanted referral settings above.

Each of these has a full diagnosis in our Xola tracking troubleshooting guide.

Frequently asked questions

Does Xola send purchases to GA4 automatically?

Xola pushes ecommerce events into a data layer, and your own Google tag picks them up, so GA4 has to be installed on your site first. Xola says the data reaches GA4 through either gtag.js or Google Tag Manager. With GTM, you also need the GA4 Event tag and Custom Event trigger described above, plus your container ID in Xola under Marketing, Conversion Tracking, Google Tag Manager.

What are Xola's GA4 event names?

Xola's GA4 article lists view_item, view_item_list, add_to_cart, add_payment_info and purchase, which are Google's standard ecommerce events, plus Xola's own xola_user_properties. The article does not list the fields inside each event, so read them in GTM Preview.

Do you need both gtag.js and Google Tag Manager for Xola?

No. Xola supports either. If GTM manages your tags, Xola recommends removing duplicate gtag.js scripts, because two Google tags for the same property can conflict and inflate numbers.

Will Xola link buttons track in GA4?

Only when the Xola checkout JavaScript is installed on the page. Xola's troubleshooting article says redirect-based checkouts do not allow analytics to track conversions properly, and its button article says URL checkout will not track Google Analytics without the JavaScript. Drawer and embedded buttons are the supported types.

Why don't GA4 purchases match Xola's transaction reports?

Xola says conversions will not be one to one. Back-office bookings, OTA bookings, recovered abandoned bookings, direct checkout links, ad blockers and differences between desktop and mobile all create gaps. GA4 item revenue is price times quantity without discounts and taxes, so compare it with Base Amount plus Add-ons in Xola.

Want a second check on your booking tracking?

We check booking tracking setups like this one as part of our Booking Signal Audit: whether each booking reaches GA4, Google Ads and Meta once, with the right value, and what the ad platforms are learning from it. Ask us about an audit or see how the audit works.