Hello 👋 How can we help?

Google Analytics integration

Written by Konstantine
Updated 3 weeks ago

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.

Did this answer your question?