Tracking with Messaging Web Widget events

Messaging Web Widget events allow your website to listen for key moments and state changes in the Zendesk Messaging experience. By subscribing to these events, you can track engagement signals, follow support flows, and trigger your own logic at key points in the customer journey. For example, when the widget opens, a proactive message appears, or a conversation begins.

Why use Web Widget events?

  • Analytics: Send events to your analytics platform (such as Google Analytics, Amplitude, or Mixpanel) to measure engagement and support effectiveness.
  • Logging & Monitoring: Log unexpected states or behavior (for example, users repeatedly opening the widget without starting a conversation), track user journeys, and troubleshoot integration issues.

How it works

The Messaging Web Widget exposes an extended event API via:

zE('messenger:on', '<eventName>', callback)

Parameters

  • callback: Function.

The callback receives an event object <object> when it runs.

Each Web Widget event has its own event object <object> structure. You can find details about each event's structure in the API reference sections below.

Each call returns an unsubscribe function, allowing you to remove the listener. Example:

const unsubscribe = zE('messenger:on', 'open', (event) => {  console.log('Widget opened', event)})
unsubscribe()

Available Events