Set up conversion tracking
Marketing page tags, checkout data, and server-side purchase events
Follow these steps to connect your marketing site to the TodayTix booking flow and get your sales into your ad platforms.
The short version
- You add two tags to your marketing site.
- If you want GA4 or other tags of your own on the ticketing site, you build them in your own Google Tag Manager (GTM) container.
- You give us access to your ad accounts. We send Add to cart and Purchase to Meta, TikTok and Google Ads from our servers.
This guide covers the standard setup. If yours differs, your TTG contact will tell you.
What to send us
Tell us which ad platforms you run. The table below covers the main ones, but we can support others.
| Platform | What we need |
|---|---|
| GTM | Your container ID (GTM-XXXXXXX) |
| Meta | Your Pixel ID |
| TikTok | Your Pixel ID and an Events API access token |
| Google Ads | Standard access to your account for [email protected] |
| GA4 | Nothing. You set GA4 up in your own GTM. |
Step 1: Add two tags to your marketing site
Your TTG contact sends you both scripts.
- Base tag: loads on every page of your marketing site. It must load first.
- Product Viewed tag: loads only on pages that feature the show, such as the homepage or a show page. Skip pages like FAQs and Terms.
We also load your container on the ticketing site, so both tags need a hostname condition that keeps them off it.
In GTM:
- Add both scripts as Custom HTML tags.
- Create a trigger for the Base tag:
- Trigger type: Initialization
- This trigger fires on: Some Initialization Events
- Condition: Page Hostname, matches RegEx,
^(www\.)?yourdomain\.com$. Replaceyourdomain\.comwith your marketing site's domain, with dots escaped. - Name:
Initialization - Marketing Site
- Set the Base tag to fire on that trigger.
- Create a Page View trigger for the Product Viewed tag, limited to pages that feature the show, with the same hostname condition. Set the Product Viewed tag to fire on it.
Three rules for the hostname condition:
- Use "matches RegEx", not "contains". "Contains yourdomain.com" also matches your ticketing site (
tickets.yourdomain.com). - Write the hostname in lowercase. GTM matching is case-sensitive and browsers report hostnames in lowercase, so a capital letter never matches.
- Check it in Preview mode. The tags should not fire on the ticketing site.
An Initialization trigger fires before any Page View trigger, so the Base tag always runs first. Don't set a tag priority or tag sequencing.
Not sure of your hostnames? Your TTG contact will confirm them.
Not using GTM? Add the Base tag to your site header, and the Product Viewed tag only to templates for pages that feature the show.
Step 2: Set up GTM for the ticketing site
This step is only needed for GA4 or other tags of your own. Meta, TikTok and Google Ads need nothing here.
We load your GTM container on every page of the ticketing site. In the standard setup we also load your Meta and TikTok pixels there, so you can build retargeting audiences from ticketing site visitors.
Triggers
Create one History Change trigger for each step below, using "Page Path contains":
| Step | Page Path contains |
|---|---|
| Calendar | /calendar |
| Add to cart | /checkout/basket |
| Purchase | /checkout/order-confirmation |
Order details
When a customer reaches the order confirmation page, we save their order details in the browser's session storage under the name checkout details. GTM can't read session storage directly, so create a Custom JavaScript variable for each detail you need.
- In GTM, create a new variable and choose Custom JavaScript.
- Paste in this function. It returns the order total:
function() {
var data = sessionStorage.getItem('checkout details');
return data ? JSON.parse(data).total : undefined;
}- To read a different detail, replace
totalwith one of these:
| Name | What it is |
|---|---|
bookingReference | Booking reference |
currency | Currency |
email | Customer email |
showId | ID of the show that was booked. Use it to tell events apart within the same ticketing domain. |
total | Order total |
Step 3: Give us access to your ad platforms
We send Add to cart and Purchase to each platform from our servers, with extra customer details that help the platform match sales to ads.
Meta
- In Meta Events Manager, open your pixel and go to Settings, then Conversions API.
- Choose "Set up through a partner integration", then choose a partner, then Segment.
- Go to business.facebook.com/settings and sign in as an admin of your Business Manager.
- Under Users, choose Partners, then Add, then "Give a partner access to your assets".
- Enter our Business Manager ID:
795036026965317. - Choose Ad accounts, select your account, and give View performance access.
- Send the invite.
TikTok
Send us your Pixel ID and an Events API access token from TikTok Events Manager.
Google Ads
Give Standard access to [email protected]. We create two conversion actions in your account, Purchase - Segment and Add to Cart - Segment. Please leave them as they are.
Step 4: Set up GA4 (optional)
You set up GA4 in your own GTM container. We don't send anything to GA4, so there's nothing to double count.
Use the triggers and variables above. On the Purchase trigger, send a purchase event with:
| GA4 field | Value |
|---|---|
transaction_id | bookingReference |
value | total |
currency | currency |
If you sell more than one show or event, add the show name to the purchase as an item name. Read showId with a Custom JavaScript variable, then map it to a name with a Lookup Table variable. Ask your TTG contact for the show ID of each event.
On the Calendar trigger, send a view_item event.
On the Add to cart trigger, send an add_to_cart event.
Don't send the customer's email, or any other personal details, to GA4.
Avoid double counting
We send Add to cart and Purchase to Meta, TikTok and Google Ads from our servers. Don't build Add to cart or Purchase tags for Meta, TikTok or Google Ads in GTM. If you do, each sale is counted twice.
GA4 is the exception. We don't send to GA4, so keep your GA4 purchase and add_to_cart tags from Step 4.
If your ad pixels run on every page of your own site, exclude the ticketing site's domain from them. In the standard setup we already load your Meta and TikTok pixels there.
Check your setup
- In GTM, use Preview mode on the ticketing site. Each trigger should fire once per step.
- Check Meta Events Manager and TikTok Events Manager to see the events arriving.
- In Google Ads, open Goals, then Conversions, and check that
Purchase - SegmentandAdd to Cart - Segmentare listed.
Run your test purchases before we switch on server-side sending. Once it's on, purchases on the live ticketing site reach your ad platforms as real sales. We confirm with you before we enable it.
Want us to look over your setup? Send us an export of your GTM container:
- In GTM, open your container and go to Admin.
- Under Container, choose Export Container.
- Choose the live (published) version.
- Choose Export, then send the file to your TTG contact.
Updated 7 days ago