How to track Chat Started/Ended on Salesforce Messaging

Posted by: Alexander Mangondato Date Posted: April 16, 2026
Back to Case Studies

Issue

The chat is loaded inside an iframe.

Solution

How to track Chat Started/Ended on Salesforce Messaging

1. Created Custom Event Triggers

Go to Triggers > New > Custom Event
For chat started: event name sf_chat_started
For chat ended: event name sf_chat_closed

2. Created 2 custom HTML tags for Chat Started and Chat Ended. Used the custom event triggers in step 1.

3. Created a custom event listener to fire on all pages

Achievement

The Chat Started/Ended events are now successfully tracked as micro-conversions in LeadManagerFX.

Snippet/Screenshot/Link

LMFX Events: Screenshot
Code: Screenshot