This code is for your website provider. If you are wanting to use one of the new Online Reservation modes made available in 2025 or after. Please provide this code to your website provider.
If you are using facebook to track events and you have configured Zr Ware to send conversion events through their Conversion API from Zr Ware itself on conversion, you don’t need to put anything in the trackConversion method.
Important! Please do not cache these files on your side as the contents of these files will change regularly.
Important: In the beginning we are going to do an A/B test where both schedulers run simultaneously so we can get data feedback on how its going. So both schedulers will need to be present on this page
The following will go into the <head> of the page
<!-- Cookie app-->
<script src="https://zrware-reservations.s3.us-west-2.amazonaws.com/cookie/latest.js" type="text/javascript"></script>
<!-- 2021 app-->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,500,600,700" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="https://zrware-reservations.s3.us-west-2.amazonaws.com/2021/lib/latest.css">
<script src="https://zrware-reservations.s3.us-west-2.amazonaws.com/2021/lib/latest.js" type="text/javascript"></script>
<!-- Online Scheduler app -->
<script type="module" src="https://zrware-reservations.s3.us-west-2.amazonaws.com/online-scheduler/lib/latest.js"></script>
The following will go into the <body> of the page. The result of the A/B test will determine whether the user will see either the 2021 Online Booker app or the most recent Online Scheduler app.
<script type="text/javascript">
window.onload = function() {
if (typeof window.ZrWareOnlineScheduler === 'function') {
window.ZrWareOnlineScheduler({
// serverUrl: 'https://training.zrware.com' for the test site
serverUrl: 'https://www.zrware.com',
// The ID of the element to insert the scheduler, replace 'reservation-form' with the ID on your page
element: 'reservation-form',
debug: false,
dev: false,
// Define this for a specific website get this franchise ID. Replace 2 with your ID
franchise: 2,
// redirectUrl: 'https://your.optional.page.here',
// commercialRedirectUrl: 'https://your.optional.commercial.page.here',
// simpleFormRedirectUrl: 'https://your.optional.simple.form.page.here',
// optional
trackLoaded: function () {
if (gtag) {
gtag('event', 'submit', {'event_category': '<You decide here>', 'event_label': '<You decide here>'});
}
if (fbq) {
fbq('track', '<you decide here>');
}
},
// optional
trackLead: function () {// gtag html must also be on the page // gtag = Assumes Google Tag Manager has previously been run/installed to the window object if (gtag) { gtag('event', 'submit', {'event_category': '<You decide here>', 'event_label': '<You decide here>'});
// gtag('event', 'submit', {'event_category': 'Appointment Lead', 'event_label': 'Online Booking Started'}); } // Assumes the Facebook tracker was previously run/installed to the window if (fbq) { fbq('track', '<You decide here>');
// fbq('track', 'Lead'); }
},
// optional
trackPhoneClick: function () {
if (gtag) {
gtag('event', 'submit', {'event_category': '<You decide here>', 'event_label': '<You decide here>'});
}
if (fbq) {
fbq('track', '<you decide here>');
}
},
// optional
trackSmsClick: function () {
if (gtag) {
gtag('event', 'submit', {'event_category': '<You decide here>', 'event_label': '<You decide here>'});
}
if (fbq) {
fbq('track', '<you decide here>');
}
},
// optional
trackSimpleFormSubmit: function () {
if (gtag) {
gtag('event', 'submit', {'event_category': '<You decide here>', 'event_label': '<You decide here>'});
}
if (fbq) {
fbq('track', '<you decide here>');
}
},
// optional
trackBusinessFormSubmit: function () {
if (gtag) {
gtag('event', 'submit', {'event_category': '<You decide here>', 'event_label': '<You decide here>'});
}
if (fbq) {
fbq('track', '<you decide here>');
}
}
});
} else {
console.error('ZrWareOnlineScheduler function is not defined');
}
};
</script>
Comments
0 comments
Please sign in to leave a comment.