Booking analytics with Google Analytics, GTM and Meta Pixel
Open Marketing → Booking analytics to send a privacy-safe booking funnel to your Google Analytics property, your Meta Pixel, or both. You can measure every way clients reach booking; select all the options you use.
Choose your booking paths
| Path | What the client does | Connection |
|---|---|---|
| Widget on your website | Books without leaving your website | Events go to the GTM already installed on your website |
| From your website to booking | Follows a link to the Tervita booking page | GA4 and/or Meta Pixel measure the page; cross-domain setup keeps the Google session |
| Direct booking page link | Opens the Tervita link from social media, maps, messages or ads | GA4 and/or Meta Pixel measure the Tervita page; no website is required |
Any combination works. For example, you can use the widget on one page, link to the full booking page elsewhere, and share the same booking page directly in social profiles.
What you need
- For a website widget: GTM installed on your website and a consent manager that can grant analytics consent.
- For the Tervita booking page: a dedicated GA4 Web Stream and its Measurement ID beginning with
G-, a Meta Pixel ID (the 15–16 digit number), or both. - An HTTPS privacy or cookie policy link that covers the analytics providers you use. It may be hosted on any HTTPS page you control; a clinic website is not required.
Tervita never asks for a GTM- container ID and never runs your GTM container on the Tervita domain.
Configure Tervita
- Open Marketing → Booking analytics.
- Select every booking path you use.
- If you selected the widget or a website-to-booking transition, enter each website origin in full, for example
https://example.com. Put multiple sites on separate lines. - If you selected either booking-page option, enter the
G-Measurement ID, the Meta Pixel ID, or both, and the privacy or cookie policy link. At least one destination is required. - Save the settings, confirm the privacy checks, then activate analytics.
Set up the website widget in GTM
Keep GTM and the consent manager on your website. Use the booking embed with analytics events enabled, and after the visitor's consent decision call the versioned Tervita consent API from the top-level website:
TervitaBooking.setConsent({
clinic: '<your-booking-address>',
analytics: true,
noticeVersion: 'cmp-v1'
})
In GTM, create a Custom Event trigger for each event shown on the Booking analytics page, then connect those triggers to GA4 Event tags. Do not map form values, services, specialists, URLs, prices, identifiers or appointment times.
Withdrawing consent must call the same API with analytics: false. Events are not stored for later replay while consent is denied.
Set up a transition from your website
Use the same GA4 Web Stream on your website and on the Tervita booking page. In GA4, open Admin → Data streams → Web → Configure tag settings → Configure your domains and add both your website hostname and the actual booking hostname.
Configure cross-domain measurement in the Google tag or GTM on your website. Keep the booking link as a normal clickable link so Google can add its linker parameter when the client clicks it. Do not add payment providers such as Stripe or Montonio as linked domains.
The consent decision travels with that link, too. Once your website has called TervitaBooking.setConsent(...) (the embed loader must be on the page, even if the widget itself is not), every click on a link into your Tervita booking page carries the decision as tervita_consent and tervita_consent_notice parameters, and the booking page honours them instead of asking again - but only when the browser's referrer is one of your listed websites. Links may keep target="_blank" and rel="noopener". A website without the loader can append the same two parameters itself after its consent manager has decided.
Set up Meta Pixel
Open Meta Events Manager → Data sources, select your pixel and copy its ID - the 15–16 digit number. Paste it into Meta Pixel ID on the Booking analytics page. Nothing else is needed: no code snippet, no dataset token, no changes to your website.
The pixel loads on the Tervita booking page only after the client allows analytics, with Meta's automatic configuration switched off, so the pixel never scans buttons or form fields on its own. On withdrawal the pixel is told to revoke consent and its cookies are removed.
The funnel arrives under Meta's standard event names, so you can optimise campaigns and build audiences on them directly:
| Tervita event | Meta event |
|---|---|
tervita_booking_opened | PageView |
tervita_booking_started | ViewContent |
tervita_booking_submit | InitiateCheckout |
tervita_booking_created | Schedule |
| all other events | custom event with the same name |
From the browser, amounts are never sent, so the pixel alone has no Purchase event - use Schedule as the booking conversion. Every hit carries an event ID, which the Conversions API connection below uses for deduplication.
Conversions API (optional)
For campaigns that rely on server-side signals, Tervita can also report the booking from its servers - the same way for a booking made in your website widget on a desktop and for one made on the Tervita page on a phone. In Meta Events Manager → Settings → Conversions API, generate an access token and paste it into Conversions API access token on the Booking analytics page. The token is stored write-only; the page only shows that one is saved.
To confirm the connection before any real booking, open Events Manager → Test events, copy the test event code, paste it into Test event code on the Booking analytics page and press Send test event: Tervita sends one server-side Schedule with that code and shows Meta's answer; the event appears under Test events within a few seconds.
With a token, once a client who allowed analytics creates a booking, Tervita sends Schedule from the server, and after a confirmed online prepayment Purchase with the paid amount and currency. Both carry the same event ID as the browser hit, so Meta counts each booking once. The server sends only what the pixel already sends from the browser - the IP address, the browser and the pixel's _fbp/_fbc cookies - and never names, contact details, or hashes of them. Bookings made without analytics consent are not reported.
Use only the booking page
Select only Direct booking page link. Enter the G- Measurement ID, the Meta Pixel ID, or both, and the policy link; the website field stays hidden. You can share the booking link anywhere, and Tervita sends consented events directly to those destinations.
Events
tervita_booking_opened— the widget or page was opened.tervita_booking_started— the client made the first meaningful choice.tervita_booking_step_viewed— a booking step was displayed.tervita_booking_submit— the booking was sent for creation.tervita_booking_created— the booking was successfully created.tervita_booking_payment_completed— online payment was confirmed.tervita_booking_error— a safe error category was recorded.
Events never contain names, contact details, form text, services, specialists, prices, appointment identifiers or times, raw URLs, query strings or Tervita platform identifiers.
Check the result
Use Google Tag Assistant and GA4 DebugView, or the Meta Pixel Helper extension and Events Manager → Test events, to test each selected path. Confirm that every conversion arrives once and that a website-to-booking transition keeps the original source and session instead of creating a Tervita self-referral.