Follow Us

Booking Widget – upon successful booking, redirect to a confirmation page

You are here:
  • Main
  • Widget Plugins
  • Booking Widget - upon successful booking, redirect to a confirmation page
< All Topics

In case you want to track your website conversion through third party widgets or code (like Google Analytics or Facebook Pixel), you’ll have to redirect your website visitors to a page on your website that has the necessary code.
To do the redirect, please add the following code under the “Add HTML before the BODY tag closure” setting of your Booking Widget:
 

  • <script>
    window.onSVR_SuccessfulBooking = function(bookingData){
    try {
    var passData = new Object();
    bookingData.email = window.svr.selection.email;
    var redirectUrl = 'https://yourdomain.com/thankyou?id=' + btoa(unescape(encodeURIComponent(JSON.stringify(bookingData))));
    window.top.location.href = redirectUrl;
    }
    catch (err) { alert(err); }
    }
    </script>

 
Don’t forget to replaceĀ yourdomain.com with your actual domain name, as well as ensure that you have a “thankyou” page.

Previous Booking Widget – disable opening / closing hours from booking
Next Booking Widget Setup
Table of Contents