This article explains how you can send Crisp's users events to Google Analytics using Google Tag Manager (or not)

We will cover a few examples but regarding Google Analytics developpers docs you will be able to set a wide variety of use case. Depending on the way you use Crisp, you should be able to build users events for support, marketing & sales teams.

If you want to have a look at all the events that are built in Crisp, you should have a look here

/!\ For Google Tag Manager, you'll need first, to create an event listener (containing the event you want to track with Crisp) and a trigger on a personalized event called "gtm.click".
You'll then have to create a personalized event called "CrispInteractions" that enables the Google Analytics triggers to send data.

Chatbox has been loaded

This event helps you to monitor how many times a chatbox has been loaded.
For this event, we use the [chat:initiated]

If you are using Google Tag Manager :
<script type="text/javascript"> $crisp.push(["on", "chat:initiated", function(){{dataLayer.push({
'event': 'CrispInteractions',
'eventCategory': 'chatbox',
'eventAction': 'chat initiated', })};}]);</script>


If you are using Universal Analytics (analytics.js) :
<script type="text/javascript">$crisp.push(["on", "chat:initiated", function(){ ga('send', 'event', 'Chat', 'Chat-Initiated');}]);</script>

Chatbox has been opened

This event helps you to monitor how many times a chatbox has been opened.
For this event, we use the [chat:opened]

If you are using Google Tag Manager :
<script type="text/javascript"> $crisp.push(["on", "chat:opened", function(){{dataLayer.push({
'event': 'CrispInteractions',
'eventCategory': 'chatbox',
'eventAction': 'chat opened', })};}]);</script>


If you are using Universal Analytics (analytics.js) :
<script type="text/javascript">$crisp.push(["on", "chat:opened", function(){ ga('send', 'event', 'Chat', 'Chat opened');}]);</script>

Chatbox has been closed

This event helps you to monitor how many times a chatbox has been closed.
For this event, we use the [chat:closed]

If you are using Google Tag Manager :
<script type="text/javascript"> $crisp.push(["on", "chat:closed", function(){{dataLayer.push({
'event': 'CrispInteractions',
'eventCategory': 'chatbox',
'eventAction': 'chat closed', })};}]);</script>


If you are using Universal Analytics (analytics.js) :
<script type="text/javascript">$crisp.push(["on", "chat:closed", function(){ ga('send', 'event', 'Chat', 'Chat closed');}]);</script>

A message has been sent

This event helps you to monitor how many messages have been sent through Crisp.
For this event, we use the [message:sent]

If you are using Google Tag Manager :
<script type="text/javascript"> $crisp.push(["on", "message:sent", function(){{dataLayer.push({
'event': 'CrispInteractions',
'eventCategory': 'chatbox',
'eventAction': 'message sent', })};}]);


If you are using Universal Analytics (analytics.js) :
<script type="text/javascript">$crisp.push(["on", "message:sent", function(){ ga('send', 'event', 'Chat', 'Message Sent');}]);</script>

A message has been received

This event helps you to monitor how many messages have been received through Crisp.
For this event, we use the [message:received]

If you are using Google Tag Manager :
<script type="text/javascript"> $crisp.push(["on", "message:received", function(){{dataLayer.push({
'event': 'CrispInteractions',
'eventCategory': 'chatbox',
'eventAction': 'message received', })};}]);</script>


If you are using Universal Analytics (analytics.js) :
<script type="text/javascript">$crisp.push(["on", "message:received", function(){ ga('send', 'event', 'Chat', 'Message Received');}]);</script>

Or, you can simply use our Zapier integration with Google Analytics
Was this article helpful?
Cancel
Thank you!