Skip to main content

How to set up Google Hotel Ads with your booking engine

Steeve avatar
Written by Steeve
Updated over 2 months ago

Add this code to the Booking Engine

<script>

window.dataLayer = window.dataLayer || [];

function gtag(){dataLayer.push(arguments);}

gtag('js', new Date());

gtag('config', 'AW-XXXXXXXX');

</script>

<!-- Event snippet for Room Booking conversion page

In your html page, add the snippet and call gtag_report_conversion when someone clicks on the chosen link or button. -->

<script>

function gtag_report_conversion(url, price, currency) {

var callback = function () {

if (typeof(url) != 'undefined') {

window.location = url;

}

};

gtag('event', 'conversion', {

'send_to': 'AW-XXXXXXXX/Yr6SCP-KqrkBEKTlqdsC',

'value': price,

'currency': currency,

'transaction_id': '',

'event_callback': callback

});

return false;

}

</script>

MHS gives us 3 separte tracking codes to input in this script above. These codes should replace the XXXXXXXX in the script above.


​Booking Link to connect Channex to GHA

https://app.syncnbook.com/HOTELNAME/book?dateFrom=(CHECKIN_DATE)&nights=(LENGTH)#/choose-room
​ *be careful to only change HOTELNAME to the slug for the property.

Did this answer your question?