# Facebook Conversions Destination

## About this integration

The Facebook Conversions API enables businesses to send events that are linked to a pixel and processed in the same manner as browser pixel events directly to Facebook. These events help you measure, report, and optimize activities so you gain valuable insights into user behavior and can improve the effectiveness of your Facebook marketing efforts.

[Mode How we forward source data to the destination: through Customer.io's servers or directly from our JavaScript client.](/cdp/destinations/getting-started/#connection-mode)

[Web sources Indicates whether or not this integration supports our the JavaScript client.](/cdp/sources/getting-started/#types-of-sources)

[API sources Indicates whether or not this integration supports our server libraries (Go, NodeJS, Python), API, Mobile SDK, and other data sources.](/cdp/sources/getting-started/#types-of-sources)

[Supported calls The API methods this integration supports.](/cdp/sources/source-spec/source-events/)

[Integration name The name of this integration if you want to enable or disable it in the `integrations` object.](/cdp/sources/source-spec/common-fields/#the-integrations-object)

Standard

[track](/api/cdp/#operation/track) and [page](/api/cdp/#operation/page)

Facebook Conversions API (Actions)

## Getting started[](#getting-started)

To set up the Facebook Conversions API destination, you’ll need a Facebook user access token from your business account. See [the section below](#facebook-token) for help creating or getting a token.

1.  Go to **[Data & Integrations > Integrations](https://fly.customer.io/workspaces/last/journeys/integrations/all/directory)** and select the **Facebook Conversions API** entry in the *Directory* tab.
    
2.  (Optional) Select the data sources that you want to connect to your outbound integration. You can always connect data sources later. We’ll only show you data sources that work with your integration.
    
3.  Configure your integration.
    
    1.  **Pixel Id**: Your Facebook Pixel ID. Note: You may also use a dataset ID here if you have configured a dataset in your Facebook Events Manager.
        
    2.  **System User Access Token**: The access token for the system user, obtained in the Facebook Business account. Learn more about [obtaining the access token](https://developers.facebook.com/docs/facebook-login/guides/access-tokens/)
        
    3.  **Test Event Code**: Use this field to specify that events should be test events rather than actual traffic. You can find your Test Event Code in your Facebook Events Manager under the "Test events" tab. You'll want to remove your Test Event Code when sending real traffic through this integration.
        
4.  Click **Enable Destination**.
    

### Get your Facebook system user access token[](#facebook-token)

To send offline conversions with a system user access token, you must first create a system user in Facebook. You can create a system user in the [Business Settings](https://business.facebook.com/settings/system-users) section of your Facebook Business Manager account.

1.  Go to your [Facebook Business](https://business.facebook.com/) account.
2.  Go to **Business Settings > Users > System users**.
3.  Click **Generate New Token**, select your app from the dropdown, and select the **ads\_management** permission.
4.  Click **Generate Token**
5.  Copy this token to the **System User Access Token** field in your destination settings.

## Actions[](#actions)

When you’re done setting things up, you can go to the *Actions* tab to see how we map incoming data to your integration.

You may need to add actions for this integration

While we often have default triggers for actions, we don't always add those actions as defaults. You may need to add actions to make sure that you're sending all the data that you want to send to your integration. See our [actions](/integrations/data-out/actions/) page for help setting up actions.

Action

Default Trigger

Description

Purchase

`type = “track”` and  
`event = “Order Completed”`

Send event when a user completes a purchase

Initiate Checkout

`type = “track”` and  
`event = “Checkout Started”`

Send event when a user enters the checkout flow

Add to Cart

`type = “track”` and  
`event = “Product Added”`

Send event when a user adds a product to the shopping cart

View Content

`type = “track”` and  
`event = “Product Viewed”`

Send event when a user views content or a product

Search

`type = “track”` and  
`event = “Products Searched”`

Send event when a user searches content or products

Page View

`type = “page”`

Send a page view event when a user lands on a page

Custom Event

Send a custom event

### Data Structure[](#data-structure)

You’ll need to set up the [data structure](/integrations/data-out/actions/#data-structure) you will send with each action. On an action page, locate the section titled *Data Structure*. The first field you need to map is called **Action Source**.

[![A screenshot of the top of an Action page. At the top, the action selected is Purchase. Under that, the trigger specifies type is track and track event name is order completed. Under that is Data Structure. The first value field on the left is blank, and this is where you'd specify the value of the Action Source, the field on the right. The value and field are highlighted in a red rectangle.](https://docs.customer.io/images/cdp-action-data-structure.png)](#2ccdc5321a7dd5484bb07cb4e58e78c7-lightbox)

The Action Source takes a variety of [values, like `app` or `website`](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/server-event/) (Scroll down to `action_source` for options). Each source requires a different set of parameters for you to send data to Facebook’s Conversion API. For instance, if your action source is `app`, you’ll need to configure these [fields](https://developers.facebook.com/docs/marketing-api/conversions-api/app-events#configuration). You can find required fields for all sources in Facebook’s [Conversion API docs](https://developers.facebook.com/docs/marketing-api/conversions-api/).

## FAQ & Troubleshooting[](#faq--troubleshooting)

### Other Standard Events[](#other-standard-events)

If you want to send [Facebook standard events](https://developers.facebook.com/docs/meta-pixel/reference#standard-events) that we don’t have ready-made actions for, you can use the Custom Event action. For example, if you want to send a `CompleteRegistration` event, you would create a custom event action, set up your trigger criteria for completed registrations, and enter “CompleteRegistration” as the Event Name. When you set up custom actions, you can add fields you expect to send in events, like `content_name` and `currency`.

### Mapped Data and Automatically Hashed Fields (PII)[](#data-and-hashes)

We automatically map user data fields to their corresponding parameters [as expected by the Conversions API](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters/) before we send data to Facebook. Facebook uses shorthands for these fields in their API. We use the full names for clarity, but we map to the appropriate fields in Facebook. For example we use `Email` to represent `em` in Facebook.

Facebook (Meta) requires that you hash personally identifiable information (PII) before sending it to the Conversions API. **We automatically hash appropriate data for you** before we send data to Facebook.

Customer.io Data Field

Facebook Conversions API Parameter

Automatically Hashed

External ID

external\_id

✅

Email

em

✅

Phone

ph

✅

Gender

ge

✅

Date of Birth

db

✅

Last Name

ln

✅

First Name

fn

✅

City

ct

✅

State

st

✅

Zip Code

zp

✅

client\_ip\_address

client\_ip\_address

client\_user\_agent

client\_user\_agent

fbc

fbc

fbp

fbp

 We automatically hash the External ID

Facebook recommends that you hash external IDs, so that external IDs match across Facebook Pixel and Facebook Conversions API if you use external IDs for [deduplication](https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events/#fbp-or-external-id).

### Server Event Parameter Requirements[](#server-event-parameter-requirements)

Facebook requires the `action_source` event parameter, which specifies where conversions occur, for all events sent to the Facebook Conversions API. If `action_source` is set to **website**, then the `client_user_agent` and the `event_source_url` parameters are also required. Events sent to the Conversions API that don’t meet this requirement may not be available for optimization, targeting, or measurement.

### Verify Events in Facebook[](#verify-events-in-facebook)

When you start sending events, you should start seeing them within twenty minutes. To confirm that Facebook received your events:

1.  Go to the Events Manager.
2.  Click the pixel corresponding to your conversion events.
3.  In the Overview tab, look for events where the *Connection Method* is *Server*.