Contact Info
19524 Nordhoff St, Suite 3A
Los Angeles, CA 91324
info@synthesisvr.com
+1 (818) 858 1282
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.

Table of Contents