10 minutes to set up
Chatra sends data to analytics automatically, no need for any additional adjustments.
Switch to Expert mode to create a conversion. Please note that this action can’t be undone. Click Tools & Settings and choose Switch to Expert Mode:
Go to the Tools & Settings → Measurement → Conversions page:
Click the plus button:
Choose Website:
Fill the Conversion name field (e.g. “Chat initiated by visitor”). The list of the events is presented below. Enable the Don’t use a value for this conversion action checkbox:
You can leave the other settings as they are. Click Create and continue:
Choose Use Google Tag Manager even if you add scripts manually – we need to get an ID and a label here:
Copy the Conversion ID and Conversion label somewhere and click Next:
Add the following code to your site, replacing the event name (Chat initiated by visitor or other) as well as the Conversion ID and Conversion label from the previous step:
<script>
window.ChatraSetup = {
onAnalyticEvent: function(eventName) {
if (eventName === 'EVENT_NAME') { /* replace EVENT_NAME with the name of the event */
var id = 'CONVERSION_ID'; /* Conversion ID from the step 8 */
var label = 'CONVERSION_LABEL'; /* Conversion label from the step 8 */
var img = new Image(1, 1);
img.src = 'https://www.googleadservices.com/pagead/conversion/'+id+'/?label='+label+'&script=0';
}
}
};
</script>
<!-- Chatra widget code -->
Conversion created! Now you can analyze the effectiveness of your advertising campaigns. You can create conversions with other chat events:
If you want to analyze multiple Google Ads Conversions in Chatra, repeat steps 2–8. Then insert the corresponding values for each eventName
:
<script>
window.ChatraSetup = {
onAnalyticEvent: function(eventName) {
/* Event #1 */
if (eventName === 'EVENT_NAME_#1') { /* replace EVENT_NAME with the name of the event */
var id = 'CONVERSION_ID_#1'; /* Conversion ID from the step 8 */
var label = 'CONVERSION_LABEL_#1'; /* Conversion label from the step 8 */
var img = new Image(1, 1);
img.src = 'https://www.googleadservices.com/pagead/conversion/'+id+'/?label='+label+'&script=0';
}
/* Event #2 */
if (eventName === 'EVENT_NAME_#2') { /* do the same for the second event */
var id = 'CONVERSION_ID_#2';
var label = 'CONVERSION_LABEL_#2';
var img = new Image(1, 1);
img.src = 'https://www.googleadservices.com/pagead/conversion/'+id+'/?label='+label+'&script=0';
}
/* Event #3 */
/* You can add more events if necessary by copying this block */
if (eventName === 'EVENT_NAME_#3') {
var id = 'CONVERSION_ID_#3';
var label = 'CONVERSION_LABEL_#3';
var img = new Image(1, 1);
img.src = 'https://www.googleadservices.com/pagead/conversion/'+id+'/?label='+label+'&script=0';
}
}
};
</script>
<!-- Chatra widget code -->