Suite

Double Suite

Double Suite

2 Guests

wh(function () { // Subscribe to the event that fires when the booking step changes. app.events.step.subscribe(function (prev, step) { // Check if the user has advanced to step 2, which is the checkout page. if (step === 2) { // This message will appear in the browser's developer console for debugging. console.log('Webhotelier: Step 2 detected. Firing Initiate Checkout event.'); // --- Google Analytics 4 (GA4) --- // Uncomment the block below if you are using Google Analytics 4 (gtag.js). /* if (typeof gtag === 'function') { gtag('event', 'begin_checkout', { 'currency': '[currency]', // The currency of the booking (e.g., 'EUR') 'value': '[total]', // The total value of the booking 'items': [{ 'item_id': '[resid]', // Booking confirmation number 'item_name': '[property]', // The name of your property 'price': '[total]', // The total price 'quantity': 1 // Always 1 for a booking }], // Custom parameters as requested 'country': '[country]', 'source': '[source]', 'property': '[property]' }); console.log('GA4 begin_checkout event has been sent.'); } else { console.error('gtag function not found. Ensure GA4 is installed correctly.'); } */ // --- Meta Pixel (Facebook) --- // Uncomment the block below if you are using the Meta Pixel. /* if (typeof fbq === 'function') { fbq('track', 'InitiateCheckout', { 'value': '[total]', 'currency': '[currency]', 'content_ids': ['[resid]'], // Booking ID 'content_type': 'product', 'contents': [{ 'id': '[resid]', 'quantity': 1, 'item_price': '[total]' }], // Custom properties can also be added 'property': '[property]', 'country': '[country]', 'source': '[source]' }); console.log('Meta Pixel InitiateCheckout event has been sent.'); } else { console.error('fbq function not found. Ensure Meta Pixel is installed correctly.'); } */ } }); });