no-translate

Integrate HelpCrunch with Google Analytics (Universal Analytics)

If you want to track chat/widget event in Google Analytics, just follow this guide.
Написано Konstantine
Оновлено 1 рік тому

Below mentoined functions work only with analytics.js library (legacy ga.js). Please don't use them if your Google Analytics is connected with gtag.js library. Read more on how to migrate from analytics.js to gtag.js here.

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('onNewUnreadChat', 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.

Чи була наша стаття корисною?