Skip to main content

Kustomer Chat GTM Event Listener

Track Kustomer chat widget interactions in GTM. Monitor open, close, conversation events, and satisfaction scores with chat_Action variable.

kustomerchatcrmecommercegtmga4supportenterprise

Event fired

Kustomer_Chat_Event

Key variable

chat_Action

Kustomer

Overview

Kustomer is a CRM-native customer service platform, now part of Meta. It combines live chat, email, SMS, and social messaging with a unified customer timeline. This listener hooks into Kustomer's JavaScript API.

Event fired: Kustomer_Chat_Event Variable: chat_Action

Tracked Events

chat_ActionDescription
chat openedWidget opens
chat closedWidget closes
conversation startedChat initiated
message sentVisitor sends message
message receivedAgent replies
satisfaction submittedCSAT rating sent
conversation endedChat session closed
proactive triggerProactive message shown

Installation

html
<!-- GTM Custom HTML Tag: Kustomer Listener -->
<script>
(function() {
  function kustPush(action, extra) {
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push(Object.assign({
      'event': 'Kustomer_Chat_Event',
      'chat_Action': action
    }, extra || {}));
  }

  var initKustomer = function() {
    if (typeof window.Kustomer === 'undefined') return;
    Kustomer.on('open', function() { kustPush('chat opened'); });
    Kustomer.on('close', function() { kustPush('chat closed'); });
    Kustomer.on('conversationCreate', function(data) {
      kustPush('conversation started', { conversationId: data.conversationId });
    });
    Kustomer.on('messageSent', function() { kustPush('message sent'); });
    Kustomer.on('messageReceived', function() { kustPush('message received'); });
    Kustomer.on('satisfactionSent', function(data) {
      kustPush('satisfaction submitted', { satisfactionScore: data.rating });
    });
  };

  window.addEventListener('load', initKustomer);
})();
</script>

Data Layer Output

json
{
  "event": "Kustomer_Chat_Event",
  "chat_Action": "conversation started",
  "conversationId": "conv_abc123"
}

Trigger Configuration

Trigger Type: Custom Event Event Name: Kustomer_Chat_Event

GA4 Mapping

GA4 EventConditionParameters
chat_widget_openchat openedchat_platform: "kustomer"
chat_ratingsatisfaction submittedrating_value

Related Listeners