If you want to track conversions in your Google Analytics dashboard when someone opens a new conversation, you can follow this tutorial here.
First of all, identify your Google Analytics integration you are using.
There are three different Google Analytics integration snippets:
analytics.js
gtm.js
ga.js
For each of them, you will have to follow their tutorials to track events.
Please identify your own integration and follow the right following step based on yours.
Let's say you want to track conversions when you get a new lead from the live chat, this is how should be implemented.
If you are using the Analytics.js tracking code follow this Google tutorial here to understand how to track events. The following example will trigger an event when a lead has been collected.
customerly.onLeadGenerated = unction(email) {
ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);
}
}
If you are using gtag.js then this is the following event to track conversions. Please refer to the official Google tutorial here.
customerly.onLeadGenerated = function(email) {
gtag('event', 'conversion', {'send_to': 'AW-CONVERSION_ID/CONVERSION_LABEL',
'value': 1.0,
'currency': 'USD'
});
}
}
If you are still using the deprecated ga.js version then you can integrate the snippet in this way to track events. Please refer to Google tutorial to understand event tracking with ga.js.
customerly.onLeadGenerated = function(email) {
_trackEvent(category, action, opt_label, opt_value, opt_noninteraction);
}
}
To find out about all the other callbacks you can use please refer to the live chat callbacks tutorial here.