Facebook: Export Audiences (Conversion API)
Send Lytics Audience events to the Facebook Conversion API to improve your ad campaign performance.
Integration Details
- Implementation Type: Server-side.
- Implementation Technique: REST API, Audience triggers
- Frequency: Batch that is continuously pushed every ten minutes.
- Resulting data: Facebook server events populated with Lytics user fields value for the users from the selected Lytics Audiences.
This integration uses the Facebook Conversion API to send the Lytics audiences events. Once the job is started, it will:
- Scan the Lytics audiences. Adds user's data parameters. It also adds the custom data paramter and Lytics audience membership information for the selected audiences for the user being exported in the Facebook server events payload. It then sends the payload to Facebook.
- The export will run continuously. As users enter or exit the Lytics audience, they will be added to a queue. The queue will be sent to Facebook every ten minutes or until the queue reaches 10,000 users, whichever happens first.
Fields
You can send Lytics user fields to Facebook's Conversion API as custom data parameters. You can also send the Lytics audience membership to Facebook. An example of the payload that is sent to Facebook Conversion API is:
[
{
"action_source": "email",
"custom_data":
{
"content_ids":
[
"123456"
],
"content_name": "product name",
"currency": "USD",
"lytics_audience_slug_1": true,
"lytics_audience_slug_2": false,
"lytics_audience_slug_3": true,
"num_items": 10,
"value": 123
},
"event_id": "sample-event-id",
"event_name": "Purchase",
"event_source_url": "https://www.some-website.com",
"event_time": 1654729272,
"user_data":
{
"em": "e43763399e5318f14cd7473c4902a6b319343d577ec8283898a5edf9dbc6d711"
}
}
]
Configuration
Follow these steps to set up and configure an Export Audiences to Conversion API job for Facebook. If you are new to creating jobs in Lytics, see the Jobs Dashboard documentation for more information.
- Select Facebook from the list of providers.
- Select the export Export Audiences to Conversion API from the list.
- Select the Authorization you would like to use or create a new one.
- Enter a Label to identify this job you are creating in Lytics.
- (Optional) Enter a Description for further context on your job.
- Select the Audiences to export to Facebook Conversion API.
- From the Facebook Ads Account ID input, select your Facebook Ads Account. Note: If it says you "must accept Custom Audiences Terms" next to the Ads Account ID, copy and paste the following URL into your browser:
https://business.facebook.com/ads/manage/customaudiences/tos/?act=YOUR_ADS_ACCOUNT_ID
. ReplaceYOUR_ADS_ACCOUNT_ID
with the account ID you wish to use. There you can accept the Facebook Ads Custom Audience terms and conditions, and then refresh this list in the Lytics App. - From the Pixel input, select your Facebook Pixel to link the Lytics audience(s) events.
- In the Event Type textbox, enter event type. You can select from Facebook's standard event or can type your custom event name. If not provided, events will be sent with Lytics Audiences name.
- (Optional) From the Event ID input, select the Lytics user field that has Facebook's Event Id field which will be used for event de-duplication process.
- (Optional) From the Event Timestamp input, select the Lytics user profile field that contains the time when the actual event occurred. If not provided then we will use the current timestamp when this event is being sent.
- From the Action Source input, select the action source where the conversion occured. If not provided, events will be sent with other as action source.
- From the User Data Parameters Mapping input, map the value from Lytics field to Facebook's user data parameters. At least one user field must be mapped. We will hash the field if required according to Facebook's requirement.
- (Optional) From the Custom Parameters Mapping input, map the value from Lytics field to Facebook's custom data parameters. NOTE: For Purchase event type, currency and value parameter must be mapped.
- (Optional) Select the Send Lytics Audience Membership checkbox to send audience membership for the selected Lytics audience.
- (Optional) Select the Existing Users checkbox to send the users who already exist in the selected Lytics audiences.
- Click Start Export.