WebHotelier Installation
Track hotel bookings end-to-end across the typical WebHotelier setup: a marketing site (e.g. yourhotel.com) and a separate booking subdomain (e.g. yourhotel.reserve-online.net). The setup has three parts: a server-side webhook from WebHotelier, the base pixel on both domains, and a small cross-domain handoff in GTM.
Prerequisites: Your TrueTracked workspace ID, an active WebHotelier API account, and admin access to your hotel marketing site and GTM container.
Step 1: Install the base pixel on both domains
Add the TrueTracked base script to the <head> of every page on both your marketing site AND the WebHotelier booking subdomain.
<link rel="preconnect" href="https://t.ttrkd.com">
<link rel="preconnect" href="https://t.ttrkd.com" crossorigin>
<script>
(function(w, d, id) {
var t = w.truetracked = w.truetracked || function() {
(t.q = t.q || []).push(arguments);
};
t._w = id;
var s = d.createElement('script');
s.async = true;
s.src = 'https://t.ttrkd.com/tt.js?w=' + id;
d.head.appendChild(s);
})(window, document, 'YOUR_WORKSPACE_ID');
</script>If WebHotelier doesn't expose a way to inject custom HTML on the booking subdomain, contact WebHotelier support and ask them to add this snippet for your account.
Step 2: Register the API PUSH webhook
WebHotelier sends new reservations via their API PUSH notification system. Email WebHotelier support to register your TrueTracked endpoint with these settings:
- Endpoint URL:
https://t.ttrkd.com/webhook/webhotelier?workspace_id=YOUR_WORKSPACE_ID - Mode: PUSH
- Format: JSON
Once WebHotelier confirms, every new reservation triggers a webhook to TrueTracked. We process new reservation events into orders; we acknowledge cancel / restore / transaction events but don't create separate dashboard entries for them.
Step 3: Bridge the browser session to the booking
On the WebHotelier booking confirmation page, fire a checkout_completed event that passes the WebHotelier confirmation number as external_id. This links the browser session to the server-side webhook.
<script>
window.truetracked('track', 'checkout_completed', {
transaction_id: '{{dlv - confirmation_number}}',
external_id: '{{dlv - confirmation_number}}',
value: {{cjs - booking_total (number)}},
currency: '{{dlv - currency}}'
});
</script>Both transaction_id and external_id should hold the same WebHotelier confirmation number. Our backend uses this value to match the browser session to the incoming webhook order.
Step 4: Cross-domain handoff
When a visitor clicks "Book now" on your marketing site and lands on the WebHotelier booking subdomain, you need to carry the TrueTracked identifiers across the domain boundary. See the full setup in Cross-Domain Tracking - the short version is: add a GTM Custom HTML tag on the marketing site that decorates the "Book now" anchor href with ?tt_user_id=...&tt_session_id=... using window.truetracked.getDecoratedUrl().
Webhook event types
WebHotelier sends multiple event types. TrueTracked handles them as follows:
| Event type | Action |
|---|---|
new | Full Purchase flow: orders insert + synthetic checkout_completed + Meta CAPI Purchase + NewCustomer / ReturnCustomer custom event + GA4 MP |
update | Order is upserted by confirmation number; CAPI may re-fire |
cancel / restore / transaction | Logged and acknowledged with 200, not processed into orders |
What gets tracked
- Booking
total_price,tax,currencyfromdata.pricing - Customer
email,phone,first_name,last_name, country, region, city, postal code, address fromdata.clientInfo - Stay details (room type, rate name, number of rooms, check-in / check-out dates) consolidated into a single line item
- Channel source (e.g. direct, OTA, marketing campaign) from
data.bookInfo.source - Original IP and User-Agent of the booker (for CAPI Event Match Quality)
Troubleshooting
- No webhook arriving: Confirm with WebHotelier support that PUSH mode is enabled for your account and the endpoint URL is exactly as listed above (workspace_id query param required).
- Booking lands but isn't linked to a browser session: The browser-side
checkout_completedfire from Step 3 isn't in place, or the confirmation page is on a domain where the pixel didn't load. Verify with browser DevTools that aPOST /eventrequest fires on the confirmation page. - Sessions look fragmented (different
tt_user_idon marketing site vs booking subdomain): The cross-domain handoff in Step 4 isn't working. Check that the anchor decoration runs before the visitor clicks "Book now".