Tracking scripts (Google Analytics) for Multi-Hotel WBE

Modified on: Wed, 21 May, 2025 at 9:13 AM

Print

We've added Google Analytics 4 tracking code, which can be used to track the visits to the pages of different hotels from Multi-Hotel WBE

Important: Please make sure you also read Tracking scripts (Google Analytics).

Tracking script options

You can choose from two tracking organisation options:  

  • Option А: All visits to Multi-Hotel WBE pages can be sent with one Measurement ID.
  • Option B: Visits to each individual hotel in Multi-Hotel WBE to be sent with different Measurement IDs

Important: Consult with your Web Designer/Google Analytics/Marketing Specialist as to exactly which option is best for you.

To use option A - one ID:

  • Open the Multi-Hotel WBE settings screen
  • In the Website Integration section, select Tracking script for page views

  • Fill in the Measurement ID field
  • Copy the <head> code and paste it into the <head> tag of the page where Multi-Hotel WBE is integrated
  • Copy the <body> code and paste it into the <body> tag of the page where Multi-Hotel WBE is integrated

To use option B - different IDs for each hotel:

  • Open the WBE configuration screen - for each hotel separately.
  • In the Website Integration section - fill in the Google Measurement ID field with the hotel ID and save the screen.

  • Open the Multi-Hotel WBE settings screen
  • In the Website Integration section select Tracking script for page views
  • Fill in the Measurement ID field with the ID that corresponds to your central website or, if you don't have one, the ID of one of the hotels.
  • Copy the <head> code and paste it into the <head> tag of the page where Multi-Hotel WBE is integrated
  • Copy the <body> code and paste it into the <body> tag of the page where Multi-Hotel WBE is integrated

Conversion tracking

Conversion tracking heavily depends on the configurations of your Google Analytics account and what 'events' you use. However, we generally recommend that you use the built-in 'events' as they are fully configured with their 'parameters'. This way, you can easily track the Clock parameters (seen below) of a completed booking in Google Analytics. Below you can see an example conversion tracking script.

Important: You still need to apply the regular 'page_view' script in your <head> tag, while adding the conversion script in the <body> tag.

Example:

<script>
   window.clockPmsWbePageViewCallback = function (params) {
     gtag('event', 'page_view', {
       send_to: params.googleMeasurementId || void(0),
       page_title: ['BookDirect', params.hotelName,
params.pageName].join(' / ')
     });

     // Start of Custom Tracking Script
     if (params.pageName === 'completed') {
       gtag('event', 'purchase', {
         send_to: params.googleMeasurementId || void(0),
         page_title: ['BookDirect', params.hotelName,
params.pageName].join(' / '),
         currency: params.totalPriceCurrency,
         transaction_id: params.bookingNumbers.join('-'),
         value: (params.totalPriceCents / 100).toString(),
         items: [
           {
             item_name: 'Accommodation',
             item_category: params.stay,
             item_category2: params.arrival,
             item_category3: params.departure,
           },
         ],
       });
     }
     // End of Custom Tracking Script
   }
</script>

Catering Custom Tracking scripts

We have also added an option for you to prepare another tracking script - Custom Tracking Script. It is similar to the Custom Tracking Script of the WBE. What is new here is that we have added the following parameters 

  • hotelId
  • hotelName
  • googleMeasurementId.

If you don't use Google Analytics, you can use the googleMeasurementId field as an ID for another tracking system and thus more easily create a Custom Tracking Script.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

On this page