Event Tracking for Chatbot Interactions
This document describes the event tracking capabilities for chatbot interactions, including call-to-action buttons and component interactions.
Overview
The chatbot platform now includes comprehensive analytics tracking for all call-to-action (CTA) elements and interactive components. These events are transmitted to your analytics platform (Google Tag Manager, Google Analytics 4, or Universal Analytics) to provide insights into how users interact with your chatbots.
Tracked Events
CTA Clicks (cta_click)
Triggered when a user clicks on any call-to-action button in the chatbot interface:
The main CTA button in the chat footer
Call to action buttons defined in the chatbot configuration
Event data includes:
{
"type": "cta_click",
"actionType": "call|email|url|quote",
"actionValue": "the value (phone number, email, URL, etc.)",
"actionLabel": "Human-readable description of the action"
}
Component Interactions (component_interaction)
Triggered when a user interacts with a chatbot component such as clicking a button in a call-to-action component:
{
"type": "component_interaction",
"componentId": "unique component ID",
"componentType": "call_to_action",
"interactionType": "button_click",
"value": "URL or other value associated with the interaction"
}
Form Events
Two form-related events are tracked:
contact_form_start: When a user begins interacting with a formcontact_form_conversion: When a form is successfully submitted
Link Clicks
Links in chatbot responses are tracked with:
link_click: For normal linksfile_download: For links to downloadable files
Implementation
Analytics Tracker Script
Include the analytics tracker script on your page alongside the chatbot embed script:
I
<script src="https://app.strictly.ai/scripts/analytics-tracker.js" data-chatbot-id="YOUR_CHATBOT_ID" data-tracking-type="gtm" data-debug="false"></script>
Configuration Options
The analytics tracker script accepts the following data attributes:
Attribute | Description | Values |
| Your chatbot ID (must match embed) | Required |
| Analytics platform to use |
|
| Show debug messages in console |
|
Google Tag Manager Setup
For GTM (recommended), create custom event triggers for:
cta_clickcomponent_interactioncontact_form_startcontact_form_conversionlink_clickfile_download
Example variable setup for the cta_click event:
Create a Data Layer Variable for
actionTypeCreate a Data Layer Variable for
actionValueCreate a Data Layer Variable for
actionLabel
Testing
Enable debug mode with data-debug="true" to view all tracked events in your browser console. Use the events to verify that your analytics implementation is working correctly before deploying to production.