Skip to main content

Tracking Events

How to set up event tracking for multiple events.

C
Written by Chris LaMorte
Updated over 9 months ago

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:

  1. contact_form_start: When a user begins interacting with a form

  2. contact_form_conversion: When a form is successfully submitted

Link Clicks

Links in chatbot responses are tracked with:

  1. link_click: For normal links

  2. file_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

data-chatbot-id

Your chatbot ID (must match embed)

Required

data-tracking-type

Analytics platform to use

gtm (default), ga4, ua

data-debug

Show debug messages in console

true or false (default)

Google Tag Manager Setup

For GTM (recommended), create custom event triggers for:

  • cta_click

  • component_interaction

  • contact_form_start

  • contact_form_conversion

  • link_click

  • file_download

Example variable setup for the cta_click event:

  • Create a Data Layer Variable for actionType

  • Create a Data Layer Variable for actionValue

  • Create 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.

Did this answer your question?