Reve Chat Event Listener

The Reve Chat event listener tracks chat interactions and user engagement, which can then be sent as event data to your analytics platform, such as Google Analytics, Piwik Pro, or Matomo, via Google Tag Manager or another Tag Management System (TMS) for detailed event analysis.

How to track Embedded Reve chat widget interactions with google tag manager

The Reve Chat event listener integrated with Google Tag Manager (GTM) provides a powerful way to track interactions between website visitors and your embedded Reve chat widget, allowing you to capture specific interactions when visitors send or receive messages through the Reve Chat widget, enabling you to gain a deeper understanding of how chat-based communication impacts user engagement and conversions.

Steps to Set Up the Reve Chat Event Listener in Google Tag Manager

  1. Create a Custom HTML Tag in GTM:

    • In GTM, create a new Custom HTML tag.
    • Insert the Reve Chat event listener script into the tag.
    • Give your tag a descriptive name, such as Reve Chat Interaction Listener.
    • Configure the tag to trigger when the page is loaded or on DOM Ready.

  2. Define the Trigger for Reve Chat Interactions:

    • The custom event name for Reve Chat interactions will be “revechat_interaction”.
    • This event will only be triggered when a website visitor sends or receives a message via the chat widget. This ensures that only relevant events are captured.
    • Set up a trigger in GTM to listen for the “revechat_interaction” event.

  3. Create a Data Layer Variable:
    To capture detailed chat interaction data, you will need to create two key Data Layer Variables in GTM:

    • revechat_type: This variable will return the value of “customRevechatMessage”, indicating that the interaction involves a custom message being sent or received via the chat widget.
    • message_content: This variable holds detailed information about the message being sent or received. It can include a range of data points related to the chat interaction, such as message type, content, timestamp, and user details. You can drill down into these data points to track specific aspects of the interaction.

Data Layer Variables You Can Capture

Here are the dataLayer variables associated with Reve Chat interactions:

  1. revechat_type:

    • Returns the value of “customRevechatMessage”, indicating that the action is related to sending or receiving a message.

You can use this variable to drill down and capture specific data points for analysis in your analytics platforms.

Send Data To Your Analytics Property In Google Tag Manager

Once the interaction events are configured to have Google Tag Manager aware when these interactions happen, you can send the data to your analytics platform to gain knowledge into user engagement and behavior, in tools like Google Analytics (GA4), Microsoft Clarity, Piwik Pro, Maromo, etc.

<script>

function handleCustomMessage(event) {

  if (event.type === 'customRevechatMessage') {

    // Extract the message from event.data

    var message = event.data;

    // Prepare data for the dataLayer push

    var dataLayerEvent = {

      event: 'revechat_interaction',

      revechat_type: event.type, // Value of event.type ('customRevechatMessage')

      message_content: message // Including the message content

    };

    // Push to the dataLayer

    window.dataLayer = window.dataLayer || [];

    window.dataLayer.push(dataLayerEvent);

  }

}

// Add an event listener for the 'customRevechatMessage' event

document.addEventListener('customRevechatMessage', handleCustomMessage);

</script>

Video of how to use the listener

Related Event Listener

Kustomer

Measure user engagements with the Kustomer chat widget on your website by using this event listener.

Helpscout

Measure how users interact with your embedded Helpscout chat widget, and use the insights to improve your strategy.

Qualaroo

Monitor and track all interactions and completions of your Qualaroo survey forms on your website.

download the google tag manager recipe for tracking Embedded Reve chat widget interactions

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