Overview
The Facebook Custom Audience Export script template enables you to define audiences in Platform and export them to your Facebook ad account for first party targeting or for use as a look-a-like seed.
If you’re interested in using this integration, please request access by submitting a ticket from the Help widget in Platform. Once you have access, you can create your script using this link, or in Platform you can navigate to Code → Scripts → More Script Templates and search for "Facebook Custom Audience Export" or 54320.
Adding a Facebook Custom Credential To Platform
Use this Service to create a Facebook Custom Credential to Platform. Note that the Facebook account you link to the credential must have admin permissions on the Facebook page you'll be importing data from. An existing Facebook group administrator on that page can give you the proper permission.
If you encounter any issues with the Service please reach out to Support@CivisAnalytics.com
Core Parameters
- Run Mode (required): The run mode of the script. One of Create, creates new audience; Update, adds users to an existing audience; or Delete, deletes users from an existing audience.
- Facebook Access Credential (required): A Custom Credential on Platform with the Facebook App ID as the username, and a valid Facebook Access Token as the password. See Adding a Facebook Custom Credential To Platform above for instructions to create one.
- Ad Account ID (required): Account on which to create the custom audience
- Custom Audience ID: ID of existing audience, for use in Update and Delete mode.
- Custom Audience Name: The name of the custom audience to create (required if creating an audience)
- Custom Audience Description: Description of your audience
- Source Database (required): Database where the data to be exported is stored
- Source Tablename (required): Schema.table to be exported. See “Source Table Accepted Fields” for details on column names.
- Output Tablename (optional): Schema.table to store Facebook response and run metadata. If no tablename is provided, this export will not store data in an output table. See “Output table fields” for details on table contents.
- Output Table Setting (optional): Drop or append Facebook response records to the output table.
Lookalike Parameters
If you choose to include a lookalike audience name, the script will automatically convert your custom audience into a lookalike seed in your Facebook Ad Account. Note lookalike seeds must have a minimum of 100 people, and it can take up to an hour for Facebook to first populate a custom audience before it can be converted, during which your Platform script will remain in the “running state”.
- Lookalike Audience Name: The name of the Lookalike Audience to create in Facebook. This should be a different name from the Custom Audience Name used as the seed for this Lookalike Audience.
- Lookalike Audience Description: Description of your Lookalike Audience
- Lookalike Value Minimum: Minimum score in order to send to Facebook (only applicable to value based lookalikes)
- Lookalike Audience Ratio: The proportion of the population to include in the lookalike audience, from 0.01 to 0.20. A 0.01 lookalike consists of the people most similar to your lookalike source (the top 1% of the audience in the selected country). Increasing the percentage creates a bigger, broader audience.
- Lookalike Audience Country: Country of ad launch with lookalike targeting, use two-letter country code. If none is provided, it defaults to the US.
Source Table Accepted Fields
The following fields are accepted to create custom audiences and/or lookalike audiences. Although none are required, their inclusion may improve your match rate. We recommend reading the Facebook guidelines on formatting lists to ensure your values are formatted correctly to get the best match rate. For many fields, we support two options for column names to accommodate both custom source tables and outputs of the Platform PII appends job. If both the custom column name and Platform PII appends name (‘vb_’ or ‘voterbase_’) appear as fields in the table, the custom name will override the related PII appends name.
Field |
Type |
'extern_id' or 'voterbase_id' |
STRING |
'fn' or 'vb_tsmart_first_name' |
STRING |
'ln' or 'vb_tsmart_last_name' |
STRING |
'ct' or 'vb_tsmart_city' |
STRING |
'st' or 'vb_tsmart_state' |
STRING |
'zip' or 'vb_tsmart_zip' |
STRING |
'phone' or 'vb_voterbase_phone' |
STRING or INT - note Facebook requires a country code. The script will automatically append a 1 to the front of any 10 digit phone number. |
‘phone_2’ |
STRING or INT |
‘phone_3’ |
STRING or INT |
‘dob' |
Timestamp or ISO format string -- YYYY-MM-DD |
'country' |
Use 2-letter country codes (lowercase) in ISO 3166-1 alpha-2 |
'gen' |
m for male and f for female |
'email' or 'voterbase_email' |
STRING |
‘lookalike_value’ |
FLOAT |
Response Table Fields
Field |
Type |
run_at |
TIMESTAMP (in UTC) |
custom_audience_id |
BIGINT (distkey and sortkey) |
platform_source_table |
STRING |
platform_source_db |
STRING |
script_id |
INT |
run_id |
INT |
lookalike_audience_id |
BIGINT |
Comments
0 comments
Please sign in to leave a comment.