Skip to main content

Analytics Events

1. Feature Overview

The webchat widget now exposes analytics events that you can listen to in your parent application. These events provide real-time insights into user interactions within the webchat, helping you track user behavior, measure engagement, and integrate webchat activity with your existing analytics tools.

2. Getting Started

The webchat emits analytics events to the parent window that hosts the widget. You can directly subscribe to these events using the instance.onAnalyticsEvent() method after the webchat has initialized.

Event Format

All analytics events follow a consistent JSON format, delivered within the data property of the message event:

{
"timestamp": "ISO_8601_DATETIME",
"event": "event_name",
"properties": {
"session_id": "UUID"
// Additional event-specific properties
}
}

timestamp: The exact time the event occurred in ISO 8601 format (e.g., 2025-03-26T16:18:44.212Z)
event: A string representing the type of analytics event (e.g., launcher_clicked, chat_expanded)
properties: An object containing additional context for the event, such as the session_id.

Subscribing to Events

After initializing the webchat, use the instance.onAnalyticsEvent() method to listen for events:

MoveoAI.init({
integrationId: "YOUR_INTEGRATION_ID",
// ... other options
})
.then((instance) => {
// Subscribe to analytics events
instance.onAnalyticsEvent((eventData) => {
// Access specific event details
const { event, properties, timestamp } = eventData;
// Implement your logic depending on the event
// ...
});
})
.catch((error) => console.error("Webchat initialization error:", error));

3. Available Analytics Events

Event NameDescription
launcher_clickedUser clicks the webchat launcher icon.
chat_expandedChat window opens or expands.
minimize_icon_clickedUser clicks the minimize icon in the chat header.
close_icon_clickedUser clicks the close (X) icon in the chat header.
close_opening_message_clickUser closes the initial opening message/teaser.
session_startA new webchat session begins.
session_endA webchat session concludes (e.g., chat ended, inactivity timeout).
message_clickUser clicks on any message bubble in the chat transcript.
terms_and_conditions_clickedUser clicks the "Terms and Conditions" checkbox (if present).
terms_and_conditions_link_clickedUser clicks the "Terms and Conditions" link itself (if present).
welcome_form_submittedUser successfully submits a welcome form (e.g., pre-chat survey).
rating_clickedUser clicks a rating option (e.g., thumbs up/down, star rating).
rating_submittedUser submits their chat rating.
popover_review_clickedUser clicks a review popover (e.g., "Was this helpful?").
popover_inactivity_end_chat_clickedUser clicks "End Chat" on an inactivity warning popover.
popover_inactivity_continue_clickedUser clicks "Continue" on an inactivity warning popover.
popover_end_chat_clickedUser clicks "End Chat" on a general end chat confirmation popover.
popover_end_chat_continue_clickedUser clicks "Continue" on a general end chat confirmation popover.
popover_expired_new_clickedUser clicks "Start New Chat" on an expired session popover.
popover_expired_end_clickedUser clicks "End Chat" on an expired session popover.
resolved_popover_continue_clickedUser clicks "Continue" on a resolved session popover.
resolved_popover_end_chat_clickedUser clicks "End Chat" on a resolved session popover.
popover_review_skip_and_close_clickedUser clicks "Skip and Close" on a review popover.
popover_feedback_close_clickedUser clicks "Close" on a feedback popover.