Demo Centers
Tourial Event Propagation
Overview
Tourial Demo Centers Event Propagation allows embedded demos to send events (eg: CTA clicks) to hosting websites or wherever else they are embedded.
For example, you could set up event propagation so when visitors click on a CTA, a message is sent that can trigger all kinds of creative ideas such as:
Launch a chat window
Display instant schedulers like Calendly
Send data to your analytics stack like Google Analytics
Trigger Webhooks
Implementation
Do I need a developer to help implement this?
Implementing Tourial Demo Center Event Propagation will take a little bit of code (to add Event Listeners) so you'll need someone who can help with that.
How does it work?
When a Tourial is embedded on a webpage, user interactions within the tour will trigger events that will be sent through window.postMessage().
You will subscribe to the above events like below in your webpage so it can be processed
What events are propagated?
Below are the different types of demo events sent from Tourial.
DEMOCENTER_SESSION_START: When Demo Center starts after the first visitor interaction
DEMOCENTER_BUTTON_CLICK: Whenever a step is displayed.
DEMOCENTER_CONTENT_LOAD: When a specific piece of content is loaded in your Demo Center (ie. interactive tour, video, pdf, article, image)
FORM_SUBMIT: When a visitor submits a form
DEMOCENTER_CONTENT_PROGRESS: When a visitor submits a form
Example: Google Tag Manager
In your Google Analytics Tag Manager account, create a new custom HTML tag.
Copy and paste the following code into the "HTML" section of the tag:
This code sets up the Google Analytics tracking script, listens for Tourial postMessage events, and pushes the event data to Google Analytics as a custom event.
Save the custom HTML tag.
Create a new trigger in your Google Tag Manager account.
Set the trigger's type to "Custom Event".
In the "Event Name" field of the trigger, enter the event type you want to trigger. It will be one of the following:
DEMOCENTER_SESSION_START
DEMOCENTER_BUTTON_CLICK
DEMOCENTER_CONTENT_LOAD
FORM_SUBMIT
DEMOCENTER_CONTENT_PROGRESS
Save the trigger.
Create a new tag in your Google Tag Manager account.
Set the tag's "Tag Type" to "GA4".
Configure the tag with your Google Analytics tracking ID and any other relevant settings.
In the "Triggering" section of the tag, select the "Custom Event" trigger that you created earlier.
Save the tag.
Publish your changes to your Google Tag Manager account.
Now, whenever a Tourial postMessage event is sent from your iFrame, the custom HTML tag will capture the event data and push it to Google Analytics as a custom event. The "Custom Event" trigger will fire whenever any "TOURIAL_EVENT" is detected, passing along the “Event Name”, and allowing you to track Tourial events in Google Analytics.
Last updated