Articles on: Developers

How to send events from Crisp to Facebook Pixel

Learn how to send Crisp chatbox events to Meta Pixel from your website JavaScript.


Meta Pixel, formerly known as Facebook Pixel, can receive custom events from Crisp when visitors interact with the chatbox. This helps marketing and sales teams measure how live chat interactions relate to campaigns, leads, and conversions.



Before you start


Make sure the Meta Pixel base code is already installed on your website and that the fbq function is available before the Crisp event listener runs.


You can adapt these examples to track:

  • Chatbox activity → opened, closed, or initiated
  • Message activity → visitor messages sent or operator messages received
  • Lead capture → visitor email added to the Crisp profile


Review your consent requirements before sending analytics or advertising events to third-party tools.



Track chatbox activity


Chatbox initiated


Use chat:initiated to track the first time the visitor initiates the chatbox experience.


<script>
window.$crisp = window.$crisp || [];

$crisp.push(["on", "chat:initiated", function() {
fbq("trackCustom", "Crisp Chat Initiated");
}]);
</script>


Chatbox opened


<script>
window.$crisp = window.$crisp || [];

$crisp.push(["on", "chat:opened", function() {
fbq("trackCustom", "Crisp Chat Opened");
}]);
</script>


Chatbox closed


<script>
window.$crisp = window.$crisp || [];

$crisp.push(["on", "chat:closed", function() {
fbq("trackCustom", "Crisp Chat Closed");
}]);
</script>



Track message activity


Visitor message sent


Use message:sent to track messages sent by visitors from the chatbox.


<script>
window.$crisp = window.$crisp || [];

$crisp.push(["on", "message:sent", function() {
fbq("trackCustom", "Crisp Message Sent");
}]);
</script>


Operator message received


Use message:received to track messages received by the visitor from an operator.


<script>
window.$crisp = window.$crisp || [];

$crisp.push(["on", "message:received", function() {
fbq("trackCustom", "Crisp Message Received");
}]);
</script>



Track lead capture


Use user:email:changed to track when the visitor email is added or updated in the Crisp profile.


<script>
window.$crisp = window.$crisp || [];

$crisp.push(["on", "user:email:changed", function() {
fbq("trackCustom", "Crisp Email Added");
}]);
</script>


Read the $crisp Methods documentation for the full list of Crisp chatbox events.


Updated on: 03/05/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!