> ## Documentation Index
> Fetch the complete documentation index at: https://help.wotnot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Tracking Facebook Pixel

> [!NOTE]
>
> Available on the **STARTER** plan and above

## Add the following JS code after the Trigger action block

Immediately after the Trigger block, add a Javascript block and add the code shown below. This initialises the pixel code so that it can start listening to tracking events fired from the chatbot.

```javascript theme={null}
!(function (f, b, e, v, n, t, s) {
  if (f.fbq) return;
  n = f.fbq = function () {
    n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);
  };
  if (!f._fbq) f._fbq = n;
  n.push = n;
  n.loaded = !0;
  n.version = "2.0";
  n.queue = [];
  t = b.createElement(e);
  t.async = !0;
  t.src = v;
  s = b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t, s);
})(
  window,
  document,
  "script",
"https://connect.facebook.net/en_US/fbevents.js"
);
fbq("init", "YOUR_FACEBOOK_PIXEL_ID");
```

> [!NOTE]
>
> Make sure you replace **YOUR\_FACEBOOK\_PIXEL\_ID** with the actual value.

## Add the fire events code

Now, we will add the events that needs to be tracked on your pixel. To do this add a Javascript block immediately after the block whose event you want to track.

For example, in the screenshot below I want to track the event when someone fills the form after choosing **Talk to sales.**

![Screenshot 2026 09 07 170920](https://mintcdn.com/wotnot/PKybgkZax_5VziX5/images/Screenshot-2026-09-07-170920.jpg?fit=max\&auto=format\&n=PKybgkZax_5VziX5\&q=85\&s=184a85d2104bf2021066f6c1f9b8cd96)

We need to use a Javascript block after the block that you want to track, and add the event tag.

You can find the standard events supported by Facebook here 👉 [https://en-gb.facebook.com/business/help/402791146561655?id=1205376682832142](https://en-gb.facebook.com/business/help/402791146561655?id=1205376682832142)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.