Setting up conversion tracking

Marketing page tags, checkout data, and server-side purchase events

This guide explains how to set up conversion tracking for the booking funnel. Both required marketing page scripts will be provided.

1. Install the marketing page tags

Two tags are required on the marketing or landing site to connect users to the booking funnel:

  • Base tag — loads on every page and initializes tracking for the booking funnel.
  • Product Viewed tag — loads only on pages where the show is featured, such as the homepage or show detail pages. It should not load on utility pages such as FAQs or Terms.

Tag implementation

The Base tag must load before the Product Viewed tag fires.

  • In GTM, add both scripts as Custom HTML tags. Trigger the Base tag on All Pages and the Product Viewed tag only on pages where the show is featured. Set the Base tag's trigger priority so it fires first.
  • For direct implementation, add the Base tag to the global template or header so it loads on every page. Add the Product Viewed tag only to templates for pages where the show is featured.

2. Access checkout and purchase data in GTM

A GTM container ID is required. Once provided, the container will load on the checkout order confirmation page.

Trigger the purchase tag

Trigger the purchase tag on a History Change event where Page Path contains:

/checkout/order-confirmation

Checkout data is written to session storage when the user reaches the order confirmation page.

Create variables for checkout data

The checkout data is not available in the GTM Data Layer. Use a Custom JavaScript Variable to read each required field from session storage.

  1. In GTM, create a new variable.
  2. Select Custom JavaScript.
  3. Use the following template, replacing total with the required field:
function() {
  var data = sessionStorage.getItem('checkout details');
  return data ? JSON.parse(data).total : undefined;
}

Available checkout data

Checkout data is stored in the browser's session storage under the key checkout details.

KeyDescriptionType
bookingReferenceBooking referenceString
currencyTransaction currencyString
emailCustomer emailString
paymentIdInternal payment referenceString
totalTotal order valueNumber

3. Recommended purchase tracking: server-side events

For Google Ads, Meta, and TikTok, send purchase events server-side through each platform's conversion API rather than using GTM to send purchase events directly to the ad platforms.

Client-side tags can be blocked by ad blockers and browser tracking restrictions. Server-side events provide a more reliable record of completed purchases.

Required access

PlatformRequired access
MetaPixel ID and permission for Segment to send events as an external platform in Meta Events Manager
TikTokPixel ID and Events API access token
Google AdsGrant Standard account access to [email protected]

Implementation recommendation

Use the server-side purchase event as the single source of purchase conversions for each platform. Do not also send purchase events from GTM for the same conversion.


Did this page help you?