> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.crisp.chat/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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.

---

# ${color}[#0080dd](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.

---

# ${color}[#0080dd](Track chatbox activity)

#### ${color}[#445055](Chatbox initiated)

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

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

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

#### ${color}[#445055](Chatbox opened)

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

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

#### ${color}[#445055](Chatbox closed)

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

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

---

# ${color}[#0080dd](Track message activity)

#### ${color}[#445055](Visitor message sent)

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

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

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

#### ${color}[#445055](Operator message received)

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

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

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

---

# ${color}[#0080dd](Track lead capture)

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

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

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

| Read the [$crisp Methods documentation](https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/dollar-crisp/) for the full list of Crisp chatbox events.