On this page

For forwarding events, Kevel Audience integrates with the following catalog of third-party platforms:

## Facebook Conversions API

Facebook Conversions API activations allow you to send events captured with Kevel Audience tracking pixel directly to Facebook using their [dedicated API](https://developers.facebook.com/docs/marketing-api/conversions-api/). This allows improving on the data tracked by [the Facebook pixel](https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking/) by complementing it with information only available on Kevel Audience (e.g., extra user ids). It also enables tracking events in scenarios where the Facebook pixel can't be used (e.g., due to the lack of support for third-party cookies).

### Collecting Events

In order to send events to Facebook, you need to first start sending Facebook tracking information within your tracking events. To do so, all event type schemas support the `facebookConversionTracking` field, where you can customize the `event_name` and `custom_data` with the same data you would use when using the [facebook pixel](https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking/#tracking-standard-events). For an example of what that schema looks like, you can check the [pageView event type documentation](https://docs.audience.kevel.com/collect/events/pageView).

This means that if you have a JavaScript tag using the Facebook pixel that would include a call such as the following:

```javascript
fbq("track", "Purchase", {currency: "USD", value: 30.00});
```

You would mimic the same Facebook tracking event using the Kevel Audience tag with:

```javascript
pcdp("event", "track", {

"facebookConversionTracking": {

"event_name": "Purchase",

"custom_data": {

"currency": "USD",

"value": 30

}

}

// extra event data should be included here

});
```

### Enabling Activations

Once you're sending Facebook events embedded within your Kevel Audience events, you need to create a _Facebook - Conversions API_, destination. Configure it with the proper pixel ID and system access token, which you should generate directly from Facebook. After the destination is set up and enabled, tracking events will be forwarded to Facebook as soon as they reach Audience.

### Sending Additional User Identifiers

This destination will send the values from the `_fbp` and `_fbc` cookies as well as the `user-agent` as user identifiers, when available on the request. Additional optional IDs, such as email or phone number hashes, increase the match rate for the event. We recommend enabling all the supported IDs to maximize the usefulness of the integration.

You can also use one external ID to identify the user on Facebook. With this strategy, you can choose an ID type to use for the external ID. Keep in mind that the selected external IDs must be provided to Facebook on other channels so that the user can be recognized using this ID, as described in [https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/external-id/](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/external-id/).

> Having this destination setup to send Facebook Browser ID and/or Facebook Browser ID invalidates the option to _Skip activation if data to activate hasn't changed since last activation_

### Deduplicating Events

If you're using both Facebook pixel and the Kevel Audience tag you might happen to send the same event to Facebook twice. In order to avoid Facebook considering the duplicated event as two different events, you should set up a [deduplication process](https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events). To do that, you should send the same event name and event id in both the Facebook pixel and the Kevel Audience tag.

Building on the previous example, you should start including an `eventID` on calls to Facebook pixel:

```javascript
fbq("track", "Purchase", {currency: "USD", value: 30.00}, {eventID: my_event_id});
```

And send the same event id when using the Kevel Audience tag:

```javascript
pcdp("event", "track", {

"facebookConversionTracking": {

"event_name": "Purchase",

"event_id": my_event_id,

"custom_data": {

"currency": "USD",

"value": 30

}

}

// extra event data should be included here

});
```

### Filtering by Pixel ID

You might want to configure different destinations for different pixel ids. In order to do so, you can send an optional `pixel_id` property on `facebookConversionTracking` that indicates the pixel ID the event should be associated with:

```javascript
pcdp("event", "track", {

"facebookConversionTracking": {

"event_name": "Purchase",

"pixel_id": my_pixel_id,

"custom_data": {

"currency": "USD",

"value": 30

}

}

// extra event data should be included here

});
```

Once you're doing that, you can enable the "Filter by _Facebook Pixel ID_" option in your destination so that only events whose pixel ID matches the pixel ID of the destination are pushed via that destination.
