Live chat tracking plugin

Live Chat Tracking plugin allows you to execute tracking JavaScript functions when any of the following events occur:

  • when chat is started
  • when chat is ended
  • when agent's message was added
  • when customer's message was added

It can work with multiple tracking tools and 3rd party applications, for example Google Analytics.

The JavaScript library of the tracking tool must be included in the web page, where chat button integration code is placed. So, in the case of Google Analytics don't forget to insert GA tracking code into your website.
Then when the event should be tracked, LiveAgent server sends the JavaScript command that you saved in the plugin's configuration to the client browser, and the JavaScript is executed in the client's browser.

Using the <script> tags is not needed in the plugin's configuration fields.

The best way to test the JavaScript which you want to save in the plugin configuration is to simply execute it in the browser console, e.g. in Google Chrome you would open Developer Tools by pressing [F12] and then selecting Console tab. If the JavaScript command works in console on your page, it will also work if you set it in the plugin configuration.

 

Tracking events with Google Analytics

If you are using Global Site Tag (gtag.js) library on your website, you can track events with the following command:

gtag('event', [eventAction], {
  'event_category': [eventCategory],
  'event_label': [eventLabel]
});

Example:

 

 

In case you are using analytics.js library on your website, you can track events with the following command:

ga('send', 'event', [eventCategory], [eventAction], [eventLabel]);

Example:

×