Facebook Custom Audiences

An API based Facebook Connector can be set up with the following procedure. The connector will send users data of all the users belonging to a given segment. The audience sent can contain both FB subscribers and non subscribers.

User variables mapping

More information you send to Facebook, better is the matching with Facebook. You can choose to send email, phone number or any other information to increase the matching with Facebook.

If users don't have enough information, we will reject them (example: if a user only have a zip code, Facebook will not be able to match this user with only this information).

It takes up to 24 hours for Facebook to match users.

Configuration

You need 2 information for the Facebook connector:

  • Ad Account ID

  • Access Token

Where can I find the Ad Account ID?

You have to go on Facebook Business https://business.facebook.com/ and login to your account.

Then you have to go to ‘Ad Account settings’:

And you will find the Ad Account ID:

Copy and paste it on our Facebook connector

Where can I find the Access Token?

For this part you have to go to Facebook Developers https://developers.facebook.com/ and create or login to your account (you need to have a dedicated account for Facebook Developer).

Create a new app

Add the product ‘Marketing API’.

Go on ‘Settings’ and ‘Advanced’ section

Link your app to your Business Manager account and add your Ad Account ID in the ‘Authorized Ad Account ID’ section:

Then click on 'App Review' and 'Permissions and features'. Find the 'Ads Management Standard Access' component and, if you don't already have it, submit a request:

https://developers.facebook.com/docs/marketing-api/access#standard

Wait for the validation of your request.

Now you have an App linked to your Facebook Business Manager Account (https://business.facebook.com/). Please check this page to be sure that the App is well associated with the Business account:

Generate the access token

You can choose here to generate a token without any expiration date (1st method, recommended) or with an expiration date (60 days - 2nd method, not recommended).

1st method: generate a token without any expiration date

You have to create a system user on your Facebook Business Account (https://business.facebook.com/).

This system user should have admin rights for the ad account and for the app you created.

When it is done, you can Generate New Token:

Select the App you have created before and select the right permission:

Then copy and paste the generated token on our connector:

2nd method: generate an access token with an expiration date (60 days)

On the Facebook developers, on your App you created, click on ‘Marketing API’ and ‘Tools’.

On ‘Get Access Token’, tick ‘ads_management’ and click on ‘Get Token’.

You can now copy and paste this token on our Facebook connector.

Be careful: Each time you click on Get Token it will generate a new one that you have to use (the previous one will be not valid anymore)

Common errors

Before to save the connector, be sure you have accepted Facebook general conditions for custom audiences.

Go on this link and replace the AD_ACCOUNT_ID per your own Ad Account ID:

https://www.facebook.com/ads/manage/customaudiences/tos/?act=AD_ACCOUNT_ID

Be sure you have the admin rights for your Facebook Business account.

Check new audience created on Facebook

Save the connector and users who will enter the segment will be pushed to Facebook new custom audience.

Then on Facebook, click on Audiences.

A new custom audience will be created.

The name of the new audience will start with CA_{name}

Last updated