Skip to main content

HelpCrunch Chat GTM Event Listener

Track HelpCrunch chat interactions in GTM. Monitor widget open/close, messages sent/received, email capture, and knowledge base usage with chatAction and chatMessage.

helpcrunchchatgtmga4supportsaascustomer-success

Event fired

helpcrunch_chat_action

Key variable

chatAction

HelpCrunch Chat

Overview

HelpCrunch is an all-in-one customer communication platform with live chat, automated messages, email marketing, and a help center. This listener hooks into HelpCrunch's JavaScript SDK to track widget interactions.

Event fired: helpcrunch_chat_action Variables: chatAction, chatMessage

Common Use Cases

  • Track support chat engagement
  • Measure proactive message click-through rates
  • Build audiences from users who engaged with help center
  • Fire lead events on email capture

Tracked Events

chatActionDescription
widget openedChat panel opens
widget closedChat panel closes
message sentVisitor message
message receivedAgent/bot reply
email capturedEmail submitted
auto-message shownAutomated message displayed
auto-message clickedCTA in auto-message clicked
form submittedLead form completed

Installation

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

  var initHC = function() {
    if (typeof window.HelpCrunch === 'undefined') return;
    HelpCrunch('onWidgetOpen', function() { hcPush('widget opened'); });
    HelpCrunch('onWidgetClose', function() { hcPush('widget closed'); });
    HelpCrunch('onMessageSent', function(msg) { hcPush('message sent', { chatMessage: msg }); });
    HelpCrunch('onMessageReceived', function(msg) { hcPush('message received', { chatMessage: msg }); });
    HelpCrunch('onAutoMessageSent', function() { hcPush('auto-message shown'); });
    HelpCrunch('onChatHidden', function() { hcPush('widget closed'); });
  };

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

Data Layer Output

json
{
  "event": "helpcrunch_chat_action",
  "chatAction": "message sent",
  "chatMessage": "Hello, I need help with my order"
}

Trigger Configuration

Trigger Type: Custom Event Event Name: helpcrunch_chat_action

Variables to Capture

Variable NameDL KeyExample
DLV – HC Chat ActionchatAction"message sent"

Related Listeners