Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Sirvoy
  • Login
  • Contact
English (US)
US English (US)
FR French
DE German
ES Spanish
NL Dutch
SE Swedish
FI Finnish
NO Norwegian
DA Danish
  • Home
  • Booking Engines
  • Tracking

Controlling the Triggering of Third-party Tracking in the Booking Engine and the Review Booking Form

Written by johana

Updated at December 20th, 2024

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
    Setup Guides Import Bookings
  • About Sirvoy
    General Technical Security & Backups
  • Rooms & Room Types
    Rooms & Room Types Categorizing Room Types Offer Add-Ons or Extras
  • Booking Engines
    Website Builder Installing on Your Website Adjusting the Booking Engine Design & CSS Input Fields Review Your Booking Feature Tracking
  • Channel Manager
    Setting Up New Channels Mapping Your Room Types General Rates & Availability Updates Overbookings
  • Financials
    Setting Up a Payment Solution Managing Payments Invoices & Receipts Accounting Taxes & Surcharges
  • Bookings
    Modify Booking View Bookings Message Templates & Automated Messaging Communication Scheduling Housekeeping and Tasks
  • Rates & Restrictions
    Rates & Discounts Restrictions Promotion & Coupon Codes
  • My Account
    Customize Your Account Subscription Statistics Export & API
+ More

Table of Contents

Before You Start Controlling the Triggering in the Booking Engine Adding a Javascript Callback Events Fired in the Booking Engine Flow: Controlling the Triggering in the Review Booking Form Adding a Javascript Callback Events Fired in the Review Booking Form Flow: Before You Go

 

When Google Analytics and/or Meta Pixel tracking are configured for a booking engine, these trigger by default when the booking engine (or review booking form) loads on your webpage. Adding a custom JavaScript callback to the booking engine makes it possible to control this triggering. This can be useful in combination with a cookie consent banner that has not yet been accepted, or if you only want to trigger specific events. 

Note: This requires some basic knowledge of Javascript callbacks. Consult your web developer if you need any assistance.

 

Before You Start

  • Add a custom script to your webpage.

Controlling the Triggering in the Booking Engine

Adding a Javascript Callback

  1. Return
    • “false” from your custom script to skip the trigger for a specific event.
    • any other value (or an empty response) to trigger the tracking.
  2. In Sirvoy, go to Settings -> Booking engines. 
  3. Click the three dots adjacent to the booking engine you want.
  4. In the drop-down list, click “How to install.”
  5. Click “Advanced.”

Your function is now called for each step the guest takes in the booking engine.

Note: To add a Javascript Callback to the Review Booking Form, go to Settings -> Guest portal -> Install.

 

Events Fired in the Booking Engine Flow:

  • page_code_required – Fires when the form to enter a coupon code is displayed (if that is required for your booking engine).
  • page_search – Fires when the search form is displayed.
  • page_results – Fires when the search results page is displayed.
  • page_details – Fires when the guest details input form is displayed.
  • page_pending – Fires before the confirmation step, after returning from a payment provider or, if you don’t use a payment provider, after the page_details event.
  • page_confirmation – Fires on the confirmation step, after returning from a payment provider or, if you don’t use a payment provider, after the page_details event.
  • booking_completed – Fires when a booking is completed on the confirmation page.

Note: When using a custom image gallery on the search results page, the events “gallery_init” and “gallery_open” will also fire.

 

Controlling the Triggering in the Review Booking Form

Adding a Javascript Callback

  1. Return
    • “false” from your custom script to skip the trigger for a specific event.
    • any other value (or an empty response) to trigger the tracking.
  2. In Sirvoy, go to Settings -> Guest portal -> Install, and click “Advanced.”
  3. Fill in the name of the function you want to call in the field “Javascript callback function.”
  4. Copy the code from “Copy this code.”
  5. Add the code to your webpage to install the review booking form.

Your function is now called for each step the guest takes in the review booking form.

Events Fired in the Review Booking Form Flow:

  • page_review_search – Fires when the review search form is displayed.
  • page_review_booking – Fires when the review booking page is displayed.
  • page_review_pending – Fires after an optional payment is made through the review form. After this event the page displays the review booking form again and the “page_review_booking” event is fired again.

Before You Go

Explore the available events and their associated data with the code below by printing out all the events in the web developer console:
 


      <script>
         function customEventHandler(data) {
            console.log("Got Sirvoy custom JS event: " + data.event);
            console.dir(data);
        }
      </script>
booking form track control

Was it worth the read?

Yes
No
Spot something odd? Let us know.

Related Articles

  • Automatic Deletion of Stripe Credit Card Details
  • Enabling Afterpay as a Payment Method
  • Charging Virtual Cards with Stripe
  • How to Set Up Google Ads Conversions and Tag Manager

Need a hand with Sirvoy?

You're in the right place.

  • Sirvoy
  • Login
  • Contact

    ©2025 Sirvoy . All Rights reserved.

    Knowledge Base Software by Helpjuice

    Expand