Kustomer Event Listener

You can track how and when your website visitors interact with the Kustomer chat widget by using the Kustomer chat event listener in combination with Google Tag Manager or Piwik Pro. This setup lets you capture these interactions and send them as events to your analytics platform (such as Google Analytics (GA4), Mixpanel, Piwik Pro, and others). The event listener is free to use and simplifies the implementation process.

How to track User Interaction With Kustomer Chat with google tag manager

You can track your website visitors’ interactions with the Kustomer chat widget using Google Tag Manager (GTM) and the Kustomer chat event listener. To do this, start by creating a new custom HTML tag in GTM and paste the Kustomer chat event listener code into this tag.

Next, you’ll need to attach a trigger to your tag. Make sure the trigger fires after the chat widget has loaded on the site; this can be set to trigger on DOM Ready or Window Loaded.

Once the Kustomer event listener is added, it will begin registering dataLayer events for various user interactions with the chat widget.

The following step involves setting up a custom event trigger in GTM, where you’ll add “Kustomer_Chat_Event” as the event name in the trigger. This event name is emitted for all chat interactions tracked by the event listener.

You’ll also need to create a variable in GTM using the “Data Layer Variable” type and set “chat_Action” as the key. This will allow you to dynamically capture different chat actions performed by visitors, such as:

  • Kustomer chat widget open
  • Kustomer chat widget close
  • Kustomer chat conversation create
  • Kustomer chat unread count change

After creating the variable, you can start sending this data to your analytics platform, such as Google Analytics (GA4), Piwik Pro, etc.

The Kustomer chat event listener can also be used with other tag management solutions by following the same principles outlined above, enabling you to track Kustomer Chat interactions in platforms like Google Analytics (GA4), Piwik Pro, etc.

To expedite the setup process, you can download a GTM recipe, which you’ll find by scrolling down this resource page.

<script>
// Ensure the dataLayer array is initialized
window.dataLayer = window.dataLayer || [];

// Function to push dataLayer events
function pushDataLayerEvent(action) {
window.dataLayer.push({
'event': 'Kustomer_Chat_Event',
'chat_Action': action
});
}

// Add listeners for Kustomer chat events
Kustomer.addListener('onOpen', function(callbackResponse) {
pushDataLayerEvent('kustomer chat widget open');
});

Kustomer.addListener('onClose', function(callbackResponse) {
pushDataLayerEvent('kustomer chat widget close');
});

Kustomer.addListener('onConversationCreate', function(callbackResponse) {
pushDataLayerEvent('kustomer chat conversation create');
});

Kustomer.addListener('onUnread', function(callbackResponse) {
pushDataLayerEvent('kustomer chat unread count change');
});
</script>

Video of how to use the listener

Related Event Listener

Pure Chat

Understand how users interact with the Pure chat widget embedded in your website and make better decisions.

Crisp Chat

If you’re using Crisp chat on your website, you can conveniently track user interactions with your Crisp chat widget.

Zoho Sales IQ

Get a better understanding of how users interact with the Zoho Sales IQ widget embedded on your website.

download the google tag manager recipe for tracking User Interaction With Kustomer Chat

we make you smarter with data

made with ❤️

The DumbData Team
Before you leave, try out these free tools.
FREE GA4 AUDIT TOOL & UTM AUDIT TOOL