How does the integration with Google Analytics work?
For contractors who already use Google Analytics, it is very easy to begin to measure and report on key Schedule Engine/Schedule Engine Live activities. If Google Analytics is already installed on a contractor's website, there is nothing else that needs to be installed or configured. All they need to do is use Google Analytics to view the key events produced by Schedule Engine/Schedule Engine Live. Table 1 provides a list of these events and labels.
Table 1 - Google Analytics Events and Labels
Troubleshooting SE Events not visible in Google Analytics/Google Tag Manager
1. Confirm that your website has the V3 version of the Schedule Engine API script. An easy way to confirm this is to be sure that src="
https://embed.scheduleengine.net/schedule-engine-v3.js
"
Is included in the Schedule Engine script you have on the website. If your team has an older version of the script, update to the V3 version which can be found here.
2. Confirm that your website has the requisite G-tag installed immediately below the head. (This can be found in your Google Analytics set up)
Not seeing Scheduler Events in GA, add in this script to the body.
GA4
<script>
// add a message when the booking process begins
ScheduleEngine.addEventListener("BookingStarted", function () {
gtag('event', 'BookingStarted', {'event_category': 'Schedule Engine - Booking' });
});
ScheduleEngine.addEventListener("BookingIssueStarted", function () {
gtag('event', 'BookingIssueStarted', {'event_category': 'Schedule Engine - Booking' });
});
ScheduleEngine.addEventListener("BookingIssueCompleted", function () {
gtag('event', 'BookingIssueCompleted', {'event_category': 'Schedule Engine - Booking' });
});
ScheduleEngine.addEventListener("BookingDetailsMedia", function () {
gtag('event', 'BookingDetailsMedia', {'event_category': 'Schedule Engine - Booking' });
});
ScheduleEngine.addEventListener("BookingCustomerQuestion", function () {
gtag('event', 'BookingCustomerQuestion', {'event_category': 'Schedule Engine - Booking' });
});
ScheduleEngine.addEventListener("BookingCustomer", function () {
gtag('event', 'BookingCustomer', {'event_category': 'Schedule Engine - Booking' });
});
ScheduleEngine.addEventListener("BookingSchedule", function () {
gtag('event', 'BookingSchedule', {'event_category': 'Schedule Engine - Booking' });
});
ScheduleEngine.addEventListener("BookingBooked", function () {
gtag('event', 'BookingBooked', {'event_category': 'Schedule Engine - Booking' });
});
</script>
GTM
<script>
window.dataLayer = window.dataLayer || [];
//Google Tag Manager Booking Widget Events
ScheduleEngine.addEventListener("BookingStarted", function (){
window.dataLayer.push({event:"BookingStarted"});
});
ScheduleEngine.addEventListener("BookingIssueStarted", function (){
window.dataLayer.push({event:"BookingIssueStarted"});
});
ScheduleEngine.addEventListener("BookingIssueCompleted", function (){
window.dataLayer.push({event:"BookingIssueCompleted"});
});
ScheduleEngine.addEventListener("BookingDetailsMedia", function (){
window.dataLayer.push({event:"BookingDetailsMedia"});
});
ScheduleEngine.addEventListener("BookingDetailsMore", function (){
window.dataLayer.push({event:"BookingDetailsMore"});
});
ScheduleEngine.addEventListener("BookingCustomerQuestion", function (){
window.dataLayer.push({event:"BookingCustomerQuestion"});
});
ScheduleEngine.addEventListener("BookingCustomer", function (){
window.dataLayer.push({event:"BookingCustomer"});
});
ScheduleEngine.addEventListener("BookingSchedule", function (){
window.dataLayer.push({event:"BookingSchedule"});
});
ScheduleEngine.addEventListener("BookingBooked", function (){
window.dataLayer.push({event:"BookingBooked"});
});
</script>
If not seeing SE Chat events in GA4, add in this script to the body.
<script>
// add a message when the booking process begins
Webchat.addEventListener("Chat Opened", function () {
gtag('event', 'Chat Opened ', {'event_category': 'Chat Widget' });
});
Webchat.addEventListener("Chat Initiated", function () {
gtag('event', 'Chat Initiated', {'event_category': 'Chat Widget' });
});
Webchat.addEventListener("Chat Served by Operator", function () {
gtag('event', 'Chat Served by Operator', {'event_category': 'Chat Widget' });
});
Webchat.addEventListener("Chat Booked Appointment", function () {
gtag('event', 'Chat Booked Appointment', {'event_category': 'Chat Widget' });
});
Webchat.addEventListener("Chat Ended", function () {
gtag('event', 'Chat Ended', {'event_category': 'Chat Widget' });
});
Webchat.addEventListener("Chat Closed", function () {
gtag('event', 'Chat Closed', {'event_category': 'Chat Widget' });
});
Webchat.addEventListener("Chat Booked Appointment", function () {
gtag('event', 'Chat Booked Appointment', {'event_category': 'Chat Widget' });
});
</script>
If you are still not seeing events fire in GA4, remove previously added GA4 script (not the G-tag script) and add the below into the body.
<script>
window.dataLayer = window.dataLayer || [];
var se_tracker_ga_method = ga.getAll()[0].get('name') + ".send";
// Add a message when the booking process begins
ScheduleEngine.addEventListener("BookingStarted", function () {
//Fire Google Analytics event
ga(se_tracker_ga_method, 'event', 'Schedule Engine - Booking', 'BookingStarted', '');
//Fire GA4
gtag('event', 'Booking Started', {'event_category': 'Schedule Engine - Booking' });
//Fire tag manager
window.dataLayer.push({event:"BookingStarted"});
})
</script>