Google Analytics integration

You can easily track HelpCrunch chat/widget events with Google Analytics. For this, just go to your website or application and insert the following tracking codes inside your HelpCrunch JavaScript code snippet.

For example, if your Google Analytics function is “ga” (default one) you will need to add these codes after HelpCrunch (‘showChatWidget’);

Track when your customer sends a message in chat:

HelpCrunch('onCustomerMessage', function (event) {
ga('send', 'event', 'customer', 'sendChatMessage');

Track when your customer opens the chat:

HelpCrunch('onChatOpen', function () {
ga('send', 'event', 'customer', 'opensChat');

Track when your customer closes the chat:

HelpCrunch('onChatClose', function () {
ga('send', 'event', 'customer', 'opensChat');

Track when your customer receives a new message:

HelpCrunch('onNewUnreadMessages', function () {
ga('send', 'event', 'customer', 'getsNewMessage');

Track when your customer submits pre-chat form:

HelpCrunch('onPreChatFormSubmit', function (event) {
ga('send', 'event', 'customer', 'submitsPreChatForm');

If you want to track any other event in Google Analytics – please contact us in chat from your HelpCrunch admin account and we will arrange it for you.


GTM Integration

You can use Google Tag Manager (GTM) to add HelpCrunch to all pages of your website in one go. It’s convenient as you won’t have to change the source code of your site. The setup is super easy and takes only a couple of minutes.

If you already use GTM, go straight to the Installing HelpCrunch through GTM section. Otherwise, first follow this short guide to create a GTM account.

How to install GTM

  1. Log in to your Google account and enter the GTM dashboard.
  2. Choose Create Account, give it a name (e.g. your company name), and click Continue.
  3. To set up a container for your tags, enter your container name, select Web, and click Create.
  4. You will see the Terms of Service Agreement. Read and click YES to accept.
  5. Add this code to every page of your website. Click OK. (Don’ forget to replace application id and secret with the valid data)

<script type='text/javascript'>
(function(w,d){ w.HelpCrunch=function(){w.HelpCrunch.q.push(arguments)}; w.HelpCrunch.q=[]; function r() { var s=document.createElement('script');'helpcrunch-widget-script'; s.async=1; s.type='text/javascript'; s.src=''; (d.body||d.head).appendChild(s); } w.helpcrunchInitWidget = r; })(window, document);
function runHelpCrunchMethods() {
HelpCrunch('init', '<your organization domain / string>', {
applicationId: <application Id / number>,
applicationSecret: '<application secret / string>'

Great! GTM installation is complete.

Installing HelpCrunch through GTM

  1. Go to your GTM dashboard and click on New Tag.
  2. Proceed by choosing Tag Configuration icon in the next window.
  3. Select Custom HTML Tag from the list of tags on your right.
  4. Paste the HelpCrunch code into HTML field and click Save.
  5. Now click on the Triggering icon at the bottom.
  6. Select the All Pages trigger and click Save.
  7. Now you must give a name to your tag (for instance, your website’s name). Once you’ve done that, click Save.
  8. To complete the installation, click Publish in the right top corner of your dashboard.
  9. Check if everything’s correct and click Publish again.

Well done! HelpCrunch is now installed across all pages of your website.