Conversion tracking

For: Agents Where to find it: Sidebar → Integrations → Marketing, and Organisation settings → Lead sources for the website snippet · comes with Quote to Book

Conversion tracking reports your confirmed bookings back to Google Analytics 4, Google Ads, Meta (Facebook and Instagram) and your own PostHog. You can then see which ads, campaigns and keywords brought in real trips, not just enquiries, and Google can bid on bookings instead of form fills.

It works in three steps:

  1. Your website captures the ad click. A small Tourium script on your website reads the campaign and ad click the visitor arrived with. It writes them into a hidden field on your enquiry form.
  2. The enquiry carries it into the CRM. When the enquiry email reaches your enquiry inbox, Tourium reads the hidden field. When you convert the enquiry, the details move onto the lead. The lead page shows them under Came from.
  3. The booking is reported. When a booking made from that lead is confirmed, Tourium sends it, with its value and booking reference, to every platform you have connected. A cancellation or a refund is reported too, where the platform supports it.

Only leads that came in through your website with tracking are reported. Phone, walk-in and agent leads are not ad conversions, so they are never sent.

Set up your website

Open Organisation settings → Lead sources, open your website's lead source and find Track ad clicks.

  1. Add the script. Copy the script tag and paste it into every page of your website, just before the closing </body> tag. On WordPress, a header-and-footer plugin or your theme's footer settings will do this.
  2. Add the hidden field. Add a hidden field labelled tourium_tracking to your enquiry form, and make sure it is included in the notification email the form sends. Form builders put each field's label in that email, so the label is what Tourium looks for. The lead source page shows the exact steps for Gravity Forms, Contact Form 7, WPForms, Elementor and Webflow.
  3. Send a test enquiry. Visit your site with a made-up campaign, for example ?utm_source=test&utm_campaign=setup, and send an enquiry. Open it in the enquiry inbox: its details show the campaign under Where they came from.

The script sends nothing anywhere itself. It only fills the hidden field on your own form.

Send enquiries from your website's server

If your website's developer would rather send enquiries straight to Tourium than by email, they can use the lead API instead of the enquiry inbox. Open the website's lead source and find Send enquiries from your website's code. Add a form under Forms on this website, then under API key:

  1. Click Create API key and copy the key straight away. It is shown only once. If it is lost, click Replace key: the old key stops working at once. To stop the website sending enquiries this way, click Revoke key. A revoked key stays listed, greyed, with the date it was revoked, and an active key shows when it was last used.
  2. Give the key to your developer, with the form's code from Get the code on the form's row. The key belongs to this website only, so enquiries sent with it land under this lead source, with its brand.
  3. Point your developer to Lead API for developers, linked from the card as Developer documentation. It lists every field, the limits and the answers, with examples in several languages.

A request looks like this:

curl -X POST https://your-agency.tourium.com/api/v1/enquiries \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_id": "form-123",
    "first_name": "Sam",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+27 82 123 4567",
    "message": "Two adults in May",
    "fields": { "adults": 2, "arrival_date": "2027-05-01" },
    "custom_fields": { "Newsletter": true },
    "form": { "id": "enquire" },
    "tracking": { "utm_source": "google", "gclid": "..." }
  }'
  • form.id and an email address or a phone number are required; everything else is optional. Add the form under Forms on this website first.
  • fields takes the same fields as the field mapping (adults, children, arrival_date, departure_date, nationality, budget and so on). Anything else goes in custom_fields (up to 30, each up to 1,000 characters), which is shown on the enquiry as it was sent. extra, the earlier name, still works.
  • form says which of the website's forms sent the enquiry, so it is linked to that form's properties and services. See Forms on a website.
  • tracking is the value the Tourium script writes into the hidden field. Read it from the form and pass it on as it is (the text, or the object it decodes to), so the enquiry keeps its ad click.
  • external_id is your own id for the enquiry. Sending the same one twice does not create a second enquiry, so a retry is safe.
  • A new enquiry answers 201 with its id, a repeat answers 200 with the same id, a wrong key answers 401, and more than 60 enquiries a minute, or more than your daily limit, answers 429.

Limit the key to your website's server

Under the key, Only accept calls from these server addresses takes the internet address of your website's server, one a line (a range such as 203.0.113.0/24 works too). Click Save addresses. A call from any other address is then refused, even with the right key, and is listed below as Refused: address not allowed. Leave the box empty to accept calls from any address. Ask your developer or hosting company for the address.

See who has used the key

Under the key, Who has used this website's API keys lists every call made with it: when it happened, the internet address and country it came from, which key it used, and whether it created an enquiry or was refused. A call made with a key you have replaced or revoked is listed too, as refused.

Your website normally calls from one address, or a few if it runs on several servers. If an address you do not recognise appears, someone else may have the key: click Replace key and give your developer the new one. The first time a key is used from an address it was never used from before, the owner of your organisation gets one email saying so.

An address is kept for 90 days and then removed. The call itself stays listed.

Enquiries sent this way show in the enquiry inbox as Website (API) and go through the same spam check and hourly limit as email enquiries: an unusual burst is kept but held for review.

Connect Google Analytics 4

Open Integrations → Marketing and fill in Google Analytics 4:

  • Measurement ID: in GA4, go to Admin → Data streams, open your website stream and copy the ID that starts with G-.
  • Measurement Protocol API secret: in the same data stream, open Measurement Protocol API secrets and create one.

Save, then click Send test event. Tourium asks GA4's validation service whether it would accept a booking, and shows any problem it reports. That check covers the measurement ID and the event's format but not the API secret, so after your first website booking is confirmed, look for it in GA4 under Admin → DebugView or in the Realtime report.

Each confirmed booking arrives in GA4 as a purchase with the booking reference as its transaction ID, and a cancellation as a refund. Each brand numbers its own bookings, so when several brands share one connection (All brands), the ID ends with a short code for the brand, for example B-2026-12-7f3a9c21. GA4 credits a booking to the visitor who made the enquiry. GA4 does not accept events more than 72 hours old, so a booking confirmed weeks after the enquiry is not tied back to the original visit. Use Google Ads for paid-campaign reporting.

Connect Google Ads

Google Ads reporting appears as Coming soon until it is switched on for your organisation. Your leads' ad clicks are saved in the meantime, so bookings made in the 90 days before it is switched on can still be reported.

Once it is available:

  1. In Google Ads, go to Goals → Conversions → New conversion action, choose Import, then Other data sources or CRMs → Track conversions from clicks. Copy the new action's ID.
  2. Set the action to Primary. If you also import a GA4 purchase into Google Ads, set that one to Secondary, or Google will count each booking twice.
  3. Set the action's click-through window to match how long your clients take to book, up to 90 days.
  4. Under Admin → Access and security, add the email shown on the Google Ads card as a user with Standard access.
  5. Back in Tourium, enter your 10-digit Customer ID and the Conversion action ID, choose whether to report what the client pays or your margin, and save.

Google needs about two weeks of data before it uses a new conversion action for bidding. Sent on a booking means Google accepted it for processing; Google matches it to the ad click over the next few hours.

Connect Meta

Open Integrations → Marketing and fill in Meta (Facebook and Instagram):

  • Dataset ID: in Meta Events Manager, the number under your Pixel or dataset's name.
  • Conversions API access token: in Events Manager, open your dataset, then Settings → Conversions API → Generate access token.
  • Test event code (optional): from the Test Events tab. While it is set, events only appear under Test Events, so remove it once you are happy. Send test event needs one.

Each confirmed booking arrives in Meta as a Purchase, matched on the visitor's Facebook click and browser cookies, and on their email address, phone number, name and country as a one-way hash. Meta only accepts events up to 7 days old, so a booking whose report could not go out within a week of being confirmed is not sent. Meta does not take cancellations or refunds.

Connect PostHog

If you use PostHog on your own website, fill in PostHog with your Project API key (starts with phc_) and your PostHog address (https://us.i.posthog.com, https://eu.i.posthog.com or your own). Bookings then appear in your PostHog as booking_confirmed, booking_cancelled and booking_refunded events on the website visitor who made the enquiry, so you can follow a visitor from their first page to their booking. This is your own PostHog project, separate from anything Tourium uses.

Report enquiries and quotes too

Each card has Also report enquiries and quotes, off by default. Turn it on and Tourium also reports each website enquiry that becomes a lead, and each quote sent and accepted:

  • GA4 receives them as generate_lead, quote_sent and quote_accepted.
  • Google Ads needs a separate conversion action for each step. Create each one as you did for bookings, set it as a Secondary goal so it informs your reports without steering your bids, and enter its ID. A step left blank is not sent.
  • Meta receives an enquiry that becomes a lead as a Lead. It has no quote events.
  • PostHog receives lead_converted, quote_sent and quote_accepted.

Refunds

A refund recorded against a booking is reported to GA4 as a refund of that amount, and to PostHog as booking_refunded. GA4 keeps only the first refund it receives for a transaction ID, so the first refund or cancellation of a booking goes under the booking's own ID and each later one under that ID with -r2, -r3 and so on added, for example B-2026-25-r2. Your refund total and net revenue in GA4 are then right; in a report by transaction ID, those later refunds show as rows of their own. Check refunds in a GA4 Explore report the day after: Realtime does not show them reliably. In Google Ads, a full cancellation removes the conversion and a partial refund lowers its value, once Google Ads reporting is switched on. A booking is never taken back twice: a cancellation after a partial refund takes back only what is left, and a refund after the cancellation was reported is not sent.

Brands

Settings saved under All brands apply to every brand. If a brand has its own website and its own Google accounts, choose it in the Brand picker and connect it separately; its bookings are then reported only there.

Seeing what was sent

Every booking page lists where the booking was reported, under Reported to ad platforms. A booking that was not sent says why, for example "visitor declined" or "ad click too old". Integrations → Marketing lists the most recent reports across all bookings.

On a Tourium test site, nothing is recorded on your accounts: GA4 and Google Ads only check each report, PostHog is skipped, and Meta is skipped unless you have set a test event code, in which case the report shows only under Test Events. These show as Checked, not recorded (test environment) or test environment.

If a platform refuses your settings (a wrong secret, or no access to the account), its card shows Needs attention with the reason. Reports keep waiting while it does, and go out on the next nightly retry once you have fixed the settings. If a platform is briefly unavailable, Tourium tries again for several hours, then once a day. A booking cancelled before its report went out is not reported at all.

Visitors' consent is captured with each enquiry.

  • No cookie banner: the script runs as normal and consent is recorded as "not asked".

  • A WordPress cookie banner: if your site runs the WP Consent API plugin, which Complianz, CookieYes, Cookiebot and most WordPress banners work with, the script follows your banner by itself: statistics consent covers analytics, and marketing consent covers ad clicks. You do not need the lines below.

  • With a cookie banner: add this line before the Tourium script, so the script waits for an answer:

    <script>window.touriumConsent = 'pending';</script>
    

    When the visitor decides, have your banner call:

    <script>Tourium.consent({ analytics: true, marketing: false });</script>
    

    Some banners announce a returning visitor's choice before the Tourium script has loaded. Add this line as well, before the Tourium script, so an early call is held until it loads:

    <script>window.Tourium = window.Tourium || { q: [], consent: function (d) { this.q.push(d); } };</script>
    

    If your banner already knows the visitor's choice when the page starts, you can set it directly instead: window.touriumConsent = { analytics: true, marketing: false };

A booking is not reported to Google Ads or Meta if the visitor declined marketing, or to GA4 or PostHog if they declined analytics, and a declined visitor's ad click is removed from the page address the form records. When there is no ad click to match on, Tourium may send Google the client's email address and phone number, and Meta those plus their name and country, but only as a one-way hash, never in readable form, and only for enquiries that came through the Tourium script or the lead API.

You are responsible for telling your website visitors about this. Wording you can adapt for your privacy policy:

When you send us an enquiry, our website records how you found us, such as the advert or campaign you clicked. If you book with us, we tell the advertising and analytics services we use (for example Google Analytics, Google Ads and Meta) that a booking was made, with its value, so we can measure which of our adverts work. Where we share your email address, phone number or name with these services for this purpose, it is first converted into a code that cannot be turned back into your details. You can decline marketing cookies on our website, and we will not report your booking for advertising purposes.