Integrate data from your LoyJoy chat into your tracking solution

With a LoyJoy chat on your site you can connect with your customers in a great way. You can watch how your customers use the chat in the LoyJoy backend. You can also extract a lot of data from LoyJoy and integrate it directly into your own website tracking solution to collect all analytics data in one place.

Tracking integration

The tracking integration is based on the LoyJoy JavaScript API. Through the JavaScript API, events are triggered for various events in the chat:

Event nameEvent description
hideThe chat window was not displayed when loading or hidden (hidden) after loading via JavaScript API.
loadThe chat was loaded
openThe chat was opened
showThe chat was displayed / no longer hidden.
startA first message was sent in the chat (if no preview messages are set this means that the chat was opened)
participationA customer has taken part in a competition in the chat
signinA customer has logged in to the chat
closeThe chat was closed by the customer or via API
signupA customer has registered in the chat
customerA customer entered new data (also contains data)
signoutA customer has logged out of the chat
newsletter_opt_inA customer accepted a newsletter in chat (single opt-in)
profiling_opt_inA customer has accepted profiling in chat (single opt-in)
reminder_opt_inA customer has accepted a reminder in chat (single opt-in)

Using the following code to integrate a LoyJoy chat in your site, LoyJoy events can be pushed to an existing Google Tag Manager data layer:

LoyJoy('boot', {
  bot: BOT_ID,
  eventListeners: [function (evt, obj) {
    dataLayer && dataLayer.push({ 'event': 'loyjoy', 'gaEventCategory': 'loyjoy', 'gaEventAction': obj && obj.process_name, 'gaEventLabel': evt })

The integration then allows you to see how often which events are triggered in the chat.

Want to see LoyJoy in a guided tour?