Skip to main content

How To: Redirect to Online Booking Page

Josh Lamb avatar
Written by Josh Lamb
Updated over 3 weeks ago

If traffic is driven directly to an online booking domain that Liine integrates with, we will receive the booking details but will not be able to capture Session Data, which is necessary to assign a 'Marketing Channel' value in the Liine dashboard.
​
In order to capture Session Data for these bookings, traffic needs to initially land on a website with the Liine Tracking Snippet/SDK installed so we can assign a Session ID.

NOTE: For the below 'Redirect Scripts' to function properly, the Liine SDK/Tracking Snippet will need to be installed on the same page(s).


A simple '301 Redirect' doesn't allow our Session ID to be assigned and passed to the Online Booking domain as we need. With a little bit of JavaScript, however, our Session ID can be passed through to the Online Booking domain.

In short, you will need to create a page on your domain that includes a JS snippet in the head or body that grabs the value of 'Liine.sessionGUID' and passes it through to the redirect.

Please see below for example snippets for various Online Booking vendors. If you do not see your Online Booking vendor listed below or have any questions, please reach out to your CSM or support@liine.com for guidance.

NOTE: The below snippets are set up to redirect AFTER our SDK has fully loaded and has generated a Session ID. If the redirect takes place before our SDK has loaded, then the Session ID will not be passed to the Online Booking domain.

Axle

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<axle_booking_domain>?liine_session_guid=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

Flex Dental

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<flex_booking_domain>?liine_session_id=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

Luma

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<luma_booking_domain>?liine_session_guid=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

MDprospects

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<mdprospects_booking_domain>?lnsg=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

NexHealth

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<nexhealth_booking_domain>?ct=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

NextPatient

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<nextpatient_booking_domain>?liine_session_guid=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

Promptly

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<promptly_booking_domain>?lnsg=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

Subscribili

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<subscribili_booking_domain>?lnsg=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

tab32

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<tab32_booking_domain>?session=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

Zenoti

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<zenoti_booking_domain>?utm_source=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

Zocdoc

document.addEventListener("DOMContentLoaded", function() {             
window.__liine_queue = window.__liine_queue || [];
window.__liine_queue.push(function() {
const sessionGUID = Liine.sessionGUID;
const redirectURL = `https://<zocdoc_booking_domain>?lnsg=${sessionGUID}`;
if (sessionGUID){
window.location.replace(redirectURL);
}
});
});

Did this answer your question?