Skip to main content

Capturing Breakout events for analytics

This article outlines how to capture and use Breakout's custom events to measure chat engagement, build retargeting audiences, and attribute leads within your analytics platform

T
Written by Tripti

Overview

Breakout generates a standardized set of custom events covering a visitor's full engagement lifecycle, including viewing a nudge, opening the chat widget, and submitting a form. These events can be detected and captured for use in analytics configuration.

Breakout Events Reference

Breakout fires the following events

Global metadata properties

All these events include the global metadata properties listed below:

Global metadata property

Description

prospect_id

Unique identifier for the visitor/prospect.

user_email

Email address of the user (if known)

page_url

URL of the page where the event was fired

Engagement events

Event name

Description

Event-specific metadata

NUDGE_LOAD

A contextual AI nudge was displayed to the visitor

nudge_id

NUDGE_CLICK

The visitor clicked on an AI nudge

nudge_id, cta_text

BLOCK_CLICK

The visitor clicked on a Breakout Block

block_name

CHAT_WIDGET_OPENED

The chat widget was opened

trigger_source=block/nudge

Interaction Events

Event name

Description

Event-specific metadata

CHAT_CTA_CLICKED

The visitor clicked a CTA within the chat

cta_label

USER_MESSAGE_SENT

The visitor sent a message in the chat

-

Conversion Events

Event name

Description

Event-specific metadata

FORM_VIEWED

A lead capture form was displayed

form_name

FORM_SUBMITTED

The visitor submitted a lead capture form

form_name

Implementation and Event Structure

Breakout triggers a custom window event, BO::EVENT, which a host-side script must listen for in order to capture and forward the data to your analytics platform.

Event listener

You can use this JavaScript code to capture an event.

window.addEventListener('BO::EVENT', function (event) {
const { event_type, metadata } = event.detail || {};
console.log('Breakout Event:', event_type, metadata);
});

Event payload structure

The event data is contained within event.detail and conforms to the following structure:

{
event_type: "<string>",
metadata: { /* object */ }
}

Implementation guide for Adobe Analytics and Google Tag Manager

Adobe Analytics

Customers using Adobe Analytics can capture Breakout engagement data by configuring Adobe Tags to listen for the BO::EVENT custom window event. The data payload is available in event.detail and includes the following structure:

{
event_type: "EVENT_NAME",
metadata: { /* event properties */ }
}

Process

  1. Create data elements in Adobe Tags

    Create data elements to capture the global metadata properties from the event detail. Use the "Custom Code" or "JavaScript Variable" type to map the following:

    • prospect_id: event.detail.metadata.prospect_id

    • user_email: event.detail.metadata.user_email

    • page_url: event.detail.metadata.page_url

  2. Event mapping reference

    Configure a Rule in Adobe Tags with a "Custom Event" trigger for BO::EVENT. Use the mapping table below to set your Adobe Analytics success events and capture specific metadata:

Breakout event name

Suggested Adobe event

Event-specific metadata

NUDGE_LOAD

event1

nudge_id

NUDGE_CLICK

event2

nudge_id, cta_text

BLOCK_CLICK

event3

block_name

CHAT_WIDGET_OPENED

event4

trigger_source

CHAT_CTA_CLICKED

event5

cta_label

USER_MESSAGE_SENT

event6

FORM_VIEWED

event7

form_name

FORM_SUBMITTED

event8

form_name

Google Tag Manager (GTM)

Breakout uses the standard pattern window.dataLayer.push({ event: 'bo_event_name', ...metadata }) to push events to the browser's data layer.

Process

  1. Data layer initialization (optional)

    The Breakout script will ensure the window.dataLayer object exists and initialize it as an empty array if it doesn't

  2. Create data layer variables for the global metadata

    Create data layer variables in GTM for the global metadata that is included with every Breakout event. These variables allow you to consistently capture this data in your tags:

    1. prospect_id: Unique identifier for the visitor/prospect

    2. user_email: The email address of the user (if known)

    3. page_url: The URL of the page where the event was fired


    In GTM, configure these as Data Layer Variables (Version 2) with the Data Layer Variable Name matching the metadata keys (e.g., prospect_id)

  3. Create custom event triggers

    To fire your analytics tags (for example, a GA4 event tag) when a Breakout action occurs, create a separate GTM trigger(type: Custom Event) for each event that you want to track

    Important: The event name in GTM must match the Breakout event name published above exactly.

Did this answer your question?