Clock - Cendyn - Tracking setup through the website
In order to track your bookings in DMP, Cendyn request you to install several tracking script inside and outside the Clock script that you’ve already installed on your website to run Clock booking engine.
This script below need to be installed above (outside) the Clock booking engine script
window.clockPmsWbePageViewCallback = function (params) { dataLayer.push({ 'event': 'cendyn', 'clocks_params':params }); }
All these scripts below needs to be installed inside the Clock booking engine script.
<!-- Google Global Site Tag --> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date()); gtag('config', 'AW-#ConversionID#'); gtag('config', 'HA-75', { 'conversion_cookie_prefix' : '_ha'}); <!-- Cendyn Global Site Tag --> (function() { var wh = document.createElement('script'); wh.type = 'text/javascript'; wh.async = true; wh.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'p.relay-t.io/wh.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wh, s); })(); window.clockPmsWbePageViewCallback = function (params) { if(params.pageName=='completed'){ <!-- Cendyn Conversion Tag --> var totalprice = (params.totalPriceCents / 100).toFixed(2); var bookingnumber = params.bookingNumbers; window._wic = window._wic || []; _wic.push(['_setHotel', '#idwihp#']); _wic.push(['_setRef', bookingnumber]); _wic.push(['_setAmount', totalprice]); _wic.push(['_setCurrency', params.totalPriceCurrency]); _wic.push(['_setIDBE', '3']); _wic.push(['_setCheckin', params.arrival]); _wic.push(['_setCheckout', params.departure]); _wic.push(['_setDateFormat', 'YYYY-MM-DD']); (function() { var wh = document.createElement('script'); wh.type = 'text/javascript'; wh.async = true; wh.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'p.relay-t.io/conv.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wh, s); })(); <!-- Google Conversion Tag --> gtag('event', 'purchase_WIHP', { 'send_to': [ 'AW-#ConversionID#/#ConversionLabel#' ], 'transaction_id': bookingnumber, 'value': totalprice, 'currency': params.totalPriceCurrency, 'items': [{ 'id': '#idwihp#', 'start_date': params.arrival, 'end_date': params.departure }] }); } }
The following variables need to be replaced by the appropriate values:
Variables | Values |
#idwihp# | The parameter associated by WIHP to each single property. We will find these IDs in the Data Sheet on Google Drive in the second tab. |
#ConversionID# | Replace #ConversionID# with the Google Ads Conversion ID of the hotel (without AW-). In order to obtain this ID, the hotel will need to obtain it from the Google Ads account he wants the Hotel Ads conversions to appear in. The hotel can either use his current Adwords account ID or create a new one to separate the campaigns. WIHP recommends to create a new account to avoid confusion as they are two different types of campaigns. |
#ConversionLabel# | Replace #ConversionLabel# with the Conversion Label in the Google Ads account used to link conversions for Hotel Ads. It must be the Conversion Label obtained from the Google Ads account used for the variable #GHAGoogleAdsID#. |
YYYY-MM-DD | Replace YYYY-MM-DD with the data format that will be provided by the Booking Engine. The default format is YYYY-MM-DD but it can also be YYYYMMDD or DD-MM-YYYY or else. |
Clock - Cendyn - Tracking setup Datalayer through GTM
In order to track your bookings in DMP, Cendyn request you to install several tracking script inside and outside the Clock script that you’ve already installed on your website to run Clock booking engine.
In the body part of your booking engine please install this code inside your Clock booking engine script :
window.clockPmsWbePageViewCallback = function (params) { dataLayer.push({ 'event': 'cendyn', 'clocks_params':params }); }
Share an admin access to your GTM for the following mail address seo6@wihphotels.com so they can install their tags into your clock booking engine.
0 comments
Article is closed for comments.