Smartwidget
Google Tag Manager (GTM-XXXXXXX) im Smart-Widget
Das neue intelligente Calenso Buchungswidget (Smart-Widget) ist als iFrame verfügbar. Dieses Widget unterstützt die folgenden GTM Tracking Events.
- 1.appointment_booking_step_questions (Schritt: Buchungsfragen vor dem Buchungsprozess)
- 2.appointment_booking_step_meetings (Schritt: Auswahl Meeting-Anbieter)
- 3.appointment_booking_step_stores (Schritt: Filialenauswahl)
- 4.appointment_booking_step_services (Schritt: Auswahl von Dienstleistungen)
- 5.appointment_booking_step_resources (Schritt: Mitarbeiter/Ressourcen Auswahl)
- 6.appointment_booking_step_available_appointments (Schritt: Terminbuchung, freie Zeitfenster)
- 7.appointment_booking_step_personal_data (Schritt: Buchungsformular, Persönliche Daten)
- 8.appointment_booking_step_summary (Schritt: Zusammenfassung)
- 9.appointment_booking_step_success (Buchung erfolgreich)
- 10.appointment_booking_step_failed (Fehler bei der Buchung)
- survey_start_step (Schritt: Start der Umfrage)
- survey_step_X (Nummer der Schritte, dynamisch)
- survey_last_step (Letzer Schritt, erfolgreicher Abschluss der Umfrage
Damit das iFrame Widget innerhalb von einer Landingpage mit anderer Domain getrackt werden kann, muss folgender Aufbau in der Webseite verwendet werden. Das iFrame sendet, somit die Tracking Events and die Parent-Landingpage. Diese Landingpage kann diese Events danach weiterverarbeiten oder an GTM übermitteln.
<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>
Last modified 1yr ago