> For the complete documentation index, see [llms.txt](https://docs.intelliticks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intelliticks.com/growth-hacks/facebook-retargeting.md).

# Facebook Retargeting

### Step 1 - Add Facebook Pixel&#x20;

Add the Facebook Pixel code to your webpages where the chatbot is live. To learn how to add the Facebook Pixel code on your website - [please refer to this link](https://www.facebook.com/business/help/964258670337005?id=1205376682832142).

### Step 2 - Add Custom Events to your Chatbot Flow

In your chatbot flow, at any stage, you can push a custom event to your Facebook Audience. And then you can use these events to create a Custom Audience that you can retarget on Facebook.&#x20;

#### How to add Custom Events in Chat Flow

* Add a [Client Javascript](/ai-builder/nodes/additional/client-javascript.md) Node in the chat flow.
* You can track custom events by calling the pixel's `fbq('trackCustom')` function, with your custom event name, and (optionally) a JSON object as its parameters. For more details refer to [Facebook's Documentation](https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking#custom-events).

```javascript
fbq('trackCustom', 'ShareDiscount', {promotion: 'share_discount_10%'});
```

**Example:-**

Suppose an insurance company has this kind of a chatflow

![](/files/-MA0SHHZwVeEu5MFiBEJ)

After the selection, a custom event can be pushed to Facebook such as&#x20;

```bash
fbq('trackCustom', 'Health-Insurance', {gender: 'Female'});
```

So, now you can create a custom audience who is interested in Health Insurance and is a female.&#x20;

{% hint style="info" %}
&#x20;This way you can create a **highly enriched customized audience** for retargeting.&#x20;
{% endhint %}

### Step 3 - Create a Custom Audience

Follow [Facebook's guide](https://www.facebook.com/business/help/666509013483225?helpref=typeahead_suggestions\&sr=1\&query=%20custom%20audience%20from%20events) on how to create a Custom Audience using Website Events.&#x20;
