Tourial Event Propagation Integration Guide
The Tourial Event Propagation Integration Guide explains how embedded Tourial demos send user interaction events like SESSION_START, TOURIAL_VIEW, and CLICK via window.postMessage() to hosting websites, enabling developers to listen for these events with JavaScript event listeners and trigger actions such as launching chat windows, displaying schedulers, sending analytics data, or firing webhooks, though implementation requires coding knowledge.
Tourial Event Propagation
Overview
Tourial Event Propagation allows embedded demos to send events (e.g., 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 actions such as:
- Launching a chat window
- Displaying instant schedulers like Calendly
- Sending data to your analytics stack like Google Analytics
- Triggering webhooks
Implementation
Do I need a developer to help implement this?
Implementing Tourial Event Propagation requires adding some code (to add Event Listeners), so you'll need someone with coding experience.
How does it work?
When a Tourial is embedded on a webpage, user interactions within the tour trigger events that are sent through window.postMessage().
You can subscribe to these events in your webpage as shown below:
<script>
window.addEventListener("message", e => {
if (e.data.type === "TOURIAL_EVENT") {
// Do something with the event here.
console.log("tourial event", e.data?.payload);
}
});
</script>
What events are propagated?
Below are the different types of demo events sent from Tourial:
SESSION_START: When Tourial starts after the first visitor interaction
{
eventType: "SESSION_START",
tourId: 'your-tourial-id',
activeVariantName: "variantDesktop" || "variantMobile",
stepId: "abc_xyz"
}
TOURIAL_VIEW: Whenever a step is displayed. (This will be the first event. The SESSION_START event is not triggered until the first visitor interaction.)
{
eventType: "TOURIAL_VIEW",
tourId: 'your-tourial-id',
activeVariantName: "variantDesktop" || "variantMobile",
stepId: "abc_xyz"
}
CLICK: When a visitor clicks on something
{
eventType: "CLICK",
tourId: "your-tourial-id",
activeVariantName: "variantDesktop",
stepId: "abc_xyz",
interaction: {
toolId: "id_of_clicked_tool",
dispatchEvent: "DISPLAY_TOOL" || "HIDE_TOOL" || "TOGGLE_TOOL" || "EXTERNAL_LINK" || "SUBMIT_FORM" || "TRIGGER_FORM" || "NEXT_PAGE" || "NEXT_ZOOM" || "CHANGE_PAGE" || "CHANGE_ZOOM" || "PREVIOUS_ZOOM" || "PREVIOUS_PAGE",
href?: "EXTERNAL_LINK href",
formId?: "TRIGGER_FORM id of the form that was opened"
}
}
FORM_SUBMIT: When a visitor submits a form
{
eventType: "FORM_SUBMIT",
tourId: "644293103c3573a4d2cf0cda",
stepId: "5667a5e5-048c-4cc5-9e06-c094cc6a5335_MAIN",
activeVariantName: "variantDesktop",
interaction: {
toolId: "6442daa85f3a19d55faea4fb",
triggeredByAction: "FORM_SUBMIT",
dispatchEvent: "SUBMIT_FORM",
formId: "6442daa85f3a19d55faea4fb"
}
}
Example: Google Tag Manager
- 1.In your Google Analytics Tag Manager account, create a new custom HTML tag.
- 2.Copy and paste the following code into the "HTML" section of the tag:
<script>
// This might already exist on page - typical GTM boilerplate
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
// Listen to TOURIAL_EVENT
// we can push the Tourial events to Google Analytics events
window.addEventListener('message', function(event) {
if (event.data.type === 'TOURIAL_EVENT') {
gtag('event', event.data.payload.eventType, event.data.payload);
}
});
</script>
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.
- 1.Save the custom HTML tag.
- 2.Create a new trigger in your Google Tag Manager account.
- 3.Set the trigger's type to "Custom Event".
- 4.In the "Event Name" field of the trigger, enter the event type you want to trigger. It will be one of the following:
- SESSION_START
- TOURIAL_VIEW
- CLICK
- FORM_SUBMIT
- 5.Save the trigger.
- 6.Create a new tag in your Google Tag Manager account.
- 7.Set the tag's "Tag Type" to "GA4".
- 8.Configure the tag with your Google Analytics tracking ID and any other relevant settings.
- 9.In the "Triggering" section of the tag, select the "Custom Event" trigger that you created earlier.
- 10.Save the tag.
- 11.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.
Related
Tour Engagement Data | Navless Product Documentation
After setting up the HubSpot Integration, Tourial engagement data—including detailed metrics like time spent, clicks, form interactions, and metadata such as Tourial name, URL, and visitor IDs—is sent via HubSpot cookies to populate contact record activity feeds, enabling users to create targeted lists, workflows, and reports based on visitor interactions with Tourials within HubSpot.
Tour Building Best Practices | Navless Product Documentation
The Navless Product Documentation outlines best practices for creating effective product tours by recommending concise, linear tours of 10-15 clicks with clear, action-oriented copy, consistent branding, minimal filler steps, and strategic embedding of "take a tour" CTAs to maximize user engagement, pipeline generation, deal acceleration, and onboarding efficiency.
Engagement Data with Salesforce | Navless Product Documentation
The documentation explains how Salesforce administrators and Tourial admins can install the Tourial Salesforce package to create a custom object called "Tourial Content View," enabling the flow of detailed engagement data—such as content name, type, view date, URL, total time spent, CTA clicks, and first session date—from Tourial experiences to Salesforce Lead, Contact, and Account records, provided the visitor has submitted a form with an email address.
Supported Content in Tour Centers | Navless Product Documentation
The Navless Product Documentation details how to enhance Tour Centers by integrating diverse supported content types—including interactive microtours, videos (via direct upload or URL from platforms like YouTube and Vimeo), images (uploaded or linked), PDFs, website URLs (with iframe embedding limitations), and Google Slides presentations—to create engaging, multi-format experiences tailored to different buyer journey stages.
How to Create a Salesforce Dashboard to Measure Tourial's Impact
The guide explains how to create a Salesforce dashboard to measure Tourial's impact by first setting up a custom report type with Tourial engagement fields linked to Contacts or Leads, then building detailed reports—such as tracking Tourial views by lifecycle stage—to analyze user interaction and influence on the sales pipeline.
How to Create a Pardot Dashboard to Measure Tourial's Impact
The guide explains how to create a Pardot dashboard to measure Tourial's impact by first setting up a dynamic list that segments contacts who engaged with Tourials using specific filters (e.g., last Tourial viewed, company exclusion, session date, lifecycle stage), and then building reports such as a bar chart showing Tourial views by lifecycle stage over time to analyze engagement across marketing and sales stages.