This code is for your website provider. If you are wanting to use one of the 2021 Online Reservation modes please provide this code to your website provider. Make sure you change your reservation mode in Admin > Reservations to a 2021 mode first.
Reminder: If you ever want to switch back from a 2021 mode to an older mode please remember to have your website provider revert their changes first. If you change the reservation mode in Admin > Reservations before your website provider makes their changes the customer will be shown the Simple Form No Online Mode.
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.
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:300,400,500,600,700" rel="stylesheet"><link rel="stylesheet" type="text/css" href="https://zrware-reservations.s3.amazonaws.com/2021/lib/latest.css">
<script src="https://zrware-reservations.s3.amazonaws.com/cookie/latest.js" type="text/javascript"></script>
<script src="https://zrware-reservations.s3.amazonaws.com/2021/lib/latest.js" type="text/javascript"></script><script type="text/javascript">
window.ZrWareReservations2021({
// 'https://training.zrware.com' for training site
serverUrl: 'https://www.zrware.com',
// The ID of the element to insert the scheduler, replace 'root' with the ID on your page
element: 'root',
// optional
// The ID of the element you would like the browser to scroll to on Continue/Back
// Can be any ID or the text 'TOP' if you want it to scroll to the top of the page
// If this is left out or not defined, it will scroll to the id defined above for element.
scrollToElement: 'TOP',
// Define this for a specific website get this franchise ID. Replace 220 with your ID
franchise: 220,
// optional
// This is intended to have /landingPage and all submissions from some page are sourced this way
source: [numeric ID from Admin > Sources],
// 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
trackConversion: function() {
if (gtag) {
gtag('event', 'submit', {'event_category': '<You decide here>', 'event_label': '<You decide here>'});
// gtag('event', 'submit', {'event_category': 'Appointment Scheduled', 'event_label': 'Thank You Page Reached'});
}
if (fbq) {
fbq('track', '<You decide here>', {value: bookingSubtotal, currency: currencyCode, content_ids: contentIds, contents: contents}, {eventID: eventId});
// fbq('track', 'Schedule', {value: bookingSubtotal, currency: currencyCode, content_ids: contentIds, contents: contents}, {eventID: eventId});
}
},
// 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>');
}
},
// optional
trackLoaded: function () {
if (window.fbq) {
window.fbq('track', 'Scheduler Loaded');
}
},
// optional
// redirectUrl: 'https://your.optional.page.here',
// airDuctsRedirectUrl: 'https://your.optional.ducts.page.here',
// commercialRedirectUrl: 'https://your.optional.commercial.page.here',
// simpleFormRedirectUrl: 'https://your.optional.simple.form.page.here',
// If your inputs look skinny or squished you can try this optional setting
// dev: false
})
</script>
Comments
0 comments
Please sign in to leave a comment.