Booking Add-On – upon successful booking, redirect to a confirmation page

Table of Contents

How Can We Help?

You are here:

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.

Sign Up For Your Trial