Script injection
1. Overview
Our Booking Engine offers the injection of custom head and body html sections. We handle only the technical implementation of the DataLayer, and Event Firing.
How to activate:
- Navigate to the CASABLANCA cloud > Booking Engine > Spaces > Space Settings.
- Enable Custom Analytics and Accept the Terms.
- Enter the Custom Head HTML / Custom Body HTML.
- Result: The system automatically injects the snippets at the end of the head / start of the body and starts to fill the DataLayer.
2. Legal and Technical Responsibility Notice
By enabling a custom header script, you assume full responsibility for the legal compliance and technical stability of your booking engine. CASABLANCA's built-in Meta Pixel and Google Analytics 4 integrations, including the associated cookie consent management, will be completely disabled on your booking engine frontend.
You are solely liable for:
Technical interruptions of your booking engine caused by the injected script (including loading errors, JavaScript exceptions, performance degradation, or checkout failures). Compliance with all applicable Austrian and EU laws and regulations, including but not limited to: the EU General Data Protection Regulation (GDPR) and the Austrian Datenschutzgesetz (DSG); the Austrian Telekommunikationsgesetz 2021 (TKG 2021), in particular § 165 (3), which governs consent for cookies and tracking technologies; the Payment Card Industry Data Security Standard (PCI DSS) v4.0.1, in particular requirements 6.4.3 and 11.6.1, which require every script executed on a payment page to be inventoried, justified, authorised, and integrity-protected. Implementation of a compliant cookie consent banner and consent management for any cookies, trackers, or similar technologies your script loads. CASABLANCA will not display its cookie banner on your booking engine while this feature is active. Any breach of these obligations is attributable to the hotel as operator, not to CASABLANCA hotelsoftware GmbH.
3. E-Commerce Event Specification
The funnel events are based on the Standard GA4 E-commerce events and pushed into the DataLayer with the following schema:
{
"event": "add_to_cart",
"commerce": {
...
}
}
The commerce object is based on the respective Standard GA4 E-commerce event data.
A. Funnel Events
We track the user journey from viewing a room to final purchase.
| EventName | Trigger | Key Parameters Sent |
|---|---|---|
| view_item_list | User views a list of offers / items. | event, commerce |
| add_to_cart | User selects an offer or adds an item. | event, commerce |
| remove_from_cart | User removes an offer or an item. | event, commerce |
| begin_checkout | User enters the checkout page. | event, commerce |
| add_shipping_info | User successfully submit checkout form. | event, commerce |
| add_payment_info | Payment window is opened. (only if direct payment is required) | event, commerce |
| purchase | User completes booking. | event, commerce |
B. Item Data Structure
4. FAQ for Agencies
Q: Why do the rate / room type / add-on names differ from what is shown on the Booking Engine?
A: We send the internal name of these items. This makes sure that, regardless of the users language, the items are grouped correctly and allows for an easier correlation between the analytics data and the CASABLANCA system.
Q: What item categories are there?
A: We categorize the items as follows: Stay, AddOn (Upselling Articles), TravelInsurance
Q: What item lists are there?
A: We send events for the following lists: day_rates, package_teaser, package_detail, travel_insurance_offers, add_ons