The new Calenso booking widget (smart widget) is available as an iFrame. This widget supports the following GTM tracking events.
Appointment booking tracking events
- appointment_booking_start (First user interaction, can be triggered later as well)
- appointment_booking_step_questions_start (step: booking questions before the booking process)
- appointment_booking_step_questions_end (step: booking questions before the booking process)
- appointment_booking_step_meetings_start (Step: Select meeting provider)
- appointment_booking_step_meetings_end (Step: Select meeting provider)
- appointment_booking_step_stores_start (Step: Store selection)
- appointment_booking_step_stores_end (Step: Store selection)
- appointment_booking_step_services_start (Step: Selection of services)
- appointment_booking_step_services_end (Step: Selection of services)
- appointment_booking_step_resources_start (Step: Workers/resource selection)
- appointment_booking_step_resources_end (Step: Workers/resource selection)
- appointment_booking_step_available_appointments_start (Step: Appointment booking, free time slots)
- appointment_booking_step_available_appointments_end (Step: Appointment booking, free time slots)
- appointment_booking_step_personal_data_start (Step: Booking Form, Personal Data)
- appointment_booking_step_personal_data_end (Step: Booking Form, Personal Data)
- appointment_booking_step_summary (Step: Summary)
- appointment_booking (Appointment booking initialized)
- appointment_booking_step_success (Booking successful)
- appointment_booking_step_failed (Booking error)
Tracking of surveys (events)
- survey_start_step (Step: start of survey)
- survey_step_X (number of steps, dynamic)
- survey_last_step (Last step, successful completion of the survey)
Cross-Domain Tracking of iFrames
In order for the iFrame widget to be tracked within a landing page with a different domain, the following structure must be used in the website. The iFrame sends the tracking events to the parent landing page. This landing page can then process these events or transmit them to GTM.
<script> function onLoadIframe() { const frame = document.getElementById('smart-widget-obj'); console.log('Inside onLoadIframe()'); setTimeout(function() { console.log('Inside onLoadIframe() before firing'); frame.contentWindow.postMessage({ name: 'from parent to child', eventName: 'PARENT_TO_CHILD_WEBSITE_EVENT' }, '*'); }, 3000); } window.addEventListener('message', (eventData) => { if (eventData.data.event === 'CALENSO_CHILD_TO_PARENT_EVENT') { console.log('Calenso Tracking Data is ', eventData.data.step); } }); </script> <iframe id="smart-widget-obj" src="LINK_ZUM_WIDGET" height="1000px" width="100%" scrolling="no" allowfullscreen onload="onLoadIframe()"></iframe>
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article