蜜豆视频

Facebook connection

Overview overview

Activate profiles for your Facebook campaigns for audience targeting, personalization, and suppression based on hashed emails.

You can use this destination for audience targeting across Facebook鈥檚 family of apps that are supported by Custom Audiences, including Facebook, Instagram, Audience Network, and Messenger. Selection of the app that you want to run campaign against is indicated at the placement level in Facebook Ads Manager.

Facebook destination in the 蜜豆视频 Experience Platform UI.

Use cases

To help you better understand how and when to use the Facebook destination, here are two sample use cases that 蜜豆视频 Experience Platform customers can solve by using this feature.

Use case #1

An online retailer wants to reach existing customers through social platforms and show them personalized offers based on their previous orders. The online retailer can ingest email addresses from their own CRM to 蜜豆视频 Experience Platform, build audiences from their own offline data, and send these audiences to the Facebook social platform, optimizing their advertising spending.

Use case #2

An airline has different customer tiers (Bronze, Silver, and Gold), and wants to provide each of the tiers with personalized offers via social platforms. However, not all customers use the airline鈥檚 mobile app, and some of them have not logged on to the company鈥檚 website. The only identifiers that the company has about these customers are membership IDs and email addresses.

To target them across social media, they can onboard the customer data from their CRM into 蜜豆视频 Experience Platform, using the email addresses as identifiers.

Next, they can use their offline data including associated membership IDs and customer tiers to build new audiences that they can target through the Facebook destination.

Supported identities supported-identities

Facebook Custom Audiences supports the activation of identities described in the table below. Learn more about identities.

Target Identity
Description
Considerations
GAID
Google Advertising ID
Select the GAID target identity when your source identity is a GAID namespace.
IDFA
Apple ID for Advertisers
Select the IDFA target identity when your source identity is an IDFA namespace.
phone_sha256
Phone numbers hashed with the SHA256 algorithm
Both plain text and SHA256 hashed phone numbers are supported by 蜜豆视频 Experience Platform. Follow the instructions in the ID matching requirements section and use the appropriate namespaces for plain text and hashed phone numbers, respectively. When your source field contains unhashed attributes, check the Apply transformation option, to have Experience Platform automatically hash the data on activation.
email_lc_sha256
Email addresses hashed with the SHA256 algorithm
Both plain text and SHA256 hashed email addresses are supported by 蜜豆视频 Experience Platform. Follow the instructions in the ID matching requirements section and use the appropriate namespaces for plain text and hashed email addresses, respectively. When your source field contains unhashed attributes, check the Apply transformation option, to have Experience Platform automatically hash the data on activation.
extern_id
Custom user IDs
Select this target identity when your source identity is a custom namespace.
gender
Gender

Accepted values:

  • m for male
  • f for female

Experience Platform automatically hashes this value before sending it to Facebook. This automatic hashing is required to comply with Facebook鈥檚 security and privacy requirements. Do not provide pre-hashed values for this field, as this will cause the matching process to fail.

date_of_birth
Date of birth
Accepted format: yyyy-MM-DD.
Experience Platform automatically hashes this value before sending it to Facebook. This automatic hashing is required to comply with Facebook鈥檚 security and privacy requirements. Do not provide pre-hashed values for this field, as this will cause the matching process to fail.
last_name
Last name
Accepted format: Lowercase, a-z characters only, no punctuation. Use UTF-8 encoding for special characters.
Experience Platform automatically hashes this value before sending it to Facebook. This automatic hashing is required to comply with Facebook鈥檚 security and privacy requirements. Do not provide pre-hashed values for this field, as this will cause the matching process to fail.
first_name
First name
Accepted format: Lowercase, a-z characters only, no punctuation, no spaces. Use UTF-8 encoding for special characters.
Experience Platform automatically hashes this value before sending it to Facebook. This automatic hashing is required to comply with Facebook鈥檚 security and privacy requirements. Do not provide pre-hashed values for this field, as this will cause the matching process to fail.
first_name_initial
First name initial
Accepted format: Lowercase, a-z characters only. Use UTF-8 encoding for special characters.
Experience Platform automatically hashes this value before sending it to Facebook. This automatic hashing is required to comply with Facebook鈥檚 security and privacy requirements. Do not provide pre-hashed values for this field, as this will cause the matching process to fail.
state
State
Use the in lowercase. For non-US states, use lowercase characters, no punctuation, no special characters, and no spaces.
Experience Platform automatically hashes this value before sending it to Facebook. This automatic hashing is required to comply with Facebook鈥檚 security and privacy requirements. Do not provide pre-hashed values for this field, as this will cause the matching process to fail.
city
City
Accepted format: Lowercase, a-z characters only, no punctuation, no special characters, no spaces.
Experience Platform automatically hashes this value before sending it to Facebook. This automatic hashing is required to comply with Facebook鈥檚 security and privacy requirements. Do not provide pre-hashed values for this field, as this will cause the matching process to fail.
zip
Zip code
Accepted format: Lowercase, no spaces. For US zip codes, use only the first 5 digits. For the UK, use the Area/District/Sector format.
Experience Platform automatically hashes this value before sending it to Facebook. This automatic hashing is required to comply with Facebook鈥檚 security and privacy requirements. Do not provide pre-hashed values for this field, as this will cause the matching process to fail.
country
Country
Accepted format: Lowercase, 2-letter country codes in format.
Experience Platform automatically hashes this value before sending it to Facebook. This automatic hashing is required to comply with Facebook鈥檚 security and privacy requirements. Do not provide pre-hashed values for this field, as this will cause the matching process to fail.

Supported audiences supported-audiences

This section describes which types of audiences you can export to this destination.

Audience origin
Supported
Description
Segmentation Service
Audiences generated through the Experience Platform Segmentation Service.
Custom uploads
Audiences imported into Experience Platform from CSV files.

Export type and frequency export-type-frequency

Refer to the table below for information about the destination export type and frequency.

Item
Type
Notes
Export type
Audience export
You are exporting all members of an audience with the identifiers (name, phone number, or others) used in the Facebook destination.
Export frequency
Streaming
Streaming destinations are 鈥渁lways on鈥 API-based connections. As soon as a profile is updated in Experience Platform based on audience evaluation, the connector sends the update downstream to the destination platform. Read more about streaming destinations.

Facebook account prerequisites facebook-account-prerequisites

Before you can send your audiences to Facebook, make sure you meet the following requirements:

  • Your Facebook user account must have full access to the Facebook Business Account which owns the Ad account that you are using.

  • Your Facebook user account must have the Manage campaigns permission enabled for the Ad account that you plan to use.

  • The 蜜豆视频 Experience Cloud business account must be added as an advertising partner in your Facebook Ad Account. Use business ID=206617933627973. See in the Facebook documentation for details.

    note important
    IMPORTANT
    When configuring the permissions for 蜜豆视频 Experience Cloud, you must enable the Manage campaigns permission. The permission is required for the 蜜豆视频 Experience Platform integration.
  • Read and sign the Facebook Custom Audiences Terms of Service. To do so, go to https://business.facebook.com/ads/manage/customaudiences/tos/?act=[accountID]&business_id=206617933627973, where accountID is your Facebook Ad Account ID. Make sure the business_id=206617933627973 section is present in the URL when you sign the Terms of Service.

    note important
    IMPORTANT
    When signing the Facebook Custom Audiences Terms of Service, make sure to use the same user account that you used to authenticate in the Facebook API.

ID matching requirements id-matching-requirements

Facebook requires that no personally identifiable information (PII) is sent in clear. Therefore, the audiences activated to Facebook can be keyed off hashed identifiers, such as email addresses or phone numbers.

Depending on the type of IDs that you ingest into 蜜豆视频 Experience Platform, you must adhere to their corresponding requirements.

Maximizing audience match rates match-rates

To achieve the highest audience match rates in Facebook, it is highly recommended to use the phone_sha256 and email_lc_sha256 target identities.

These identifiers are the primary ones used by Facebook for matching audiences across their platforms. Ensure that your source data is properly mapped to these target identities and adheres to Facebook鈥檚 hashing requirements.

Phone number hashing requirements phone-number-hashing-requirements

There are two methods to activate phone numbers in Facebook:

  • Ingesting raw phone numbers: you can ingest raw phone numbers in the E.164 format into Experience Platform. They automatically hashed upon activation. If you choose this option, make sure to always ingest your raw phone numbers into the Phone_E.164 namespace.
  • Ingesting hashed phone numbers: you can pre-hash your phone numbers before ingestion into Experience Platform. If you choose this option, make sure to always ingest your hashed phone numbers into the Phone_SHA256 namespace.
NOTE
Phone numbers ingested into the Phone namespace cannot be activated in Facebook.

Email hashing requirements email-hashing-requirements

You can hash email addresses before ingesting them into 蜜豆视频 Experience Platform, or use email addresses in clear in Experience Platform, and have Experience Platform hash them on activation.

To learn about ingesting email addresses in Experience Platform, see the batch ingestion overview and the streaming ingestion overview.

If you select to hash the email addresses yourself, make sure to comply with the following requirements:

  • Trim all leading and trailing spaces from the email string; example: johndoe@example.com, not <space>johndoe@example.com<space>;
  • When hashing the email strings, make sure to hash the lowercase string;
    • Example: example@email.com, not EXAMPLE@EMAIL.COM;
  • Ensure that the hashed string is all lowercase
    • Example: 55e79200c1635b37ad31a378c39feb12f120f116625093a19bc32fff15041149, not 55E79200C1635B37AD31A378C39FEB12F120F116625093A19bC32FFF15041149;
  • Do not salt the string.
NOTE
Data from unhashed namespaces is automatically hashed by Experience Platform upon activation.
Attribute source data is not automatically hashed. When your source field contains unhashed attributes, check the Apply transformation option, to have Experience Platform automatically hash the data on activation.
The Apply transformation option is only displayed when you select attributes as source fields. It is not displayed when you choose namespaces.

Apply transformation control highlighted in the mapping step.

Using custom namespaces custom-namespaces

Before you can use the Extern_ID namespace to send data to Facebook, make sure you synchronize your own identifiers using Facebook Pixel. See the for detailed information.

Connect to the destination connect

IMPORTANT
To connect to the destination, you need the View Destinations and Manage Destinations access control permissions. Read the access control overview or contact your product administrator to obtain the required permissions.

To connect to this destination, follow the steps described in the destination configuration tutorial. In the configure destination workflow, fill in the fields listed in the two sections below.

The video below also demonstrates the steps to configure a Facebook destination and activate audiences.

Transcript
In this video, I鈥檒l demonstrate how to connect to a social destination in real-time customer data platform. Let鈥檚 get started. The LinkedIn Matched Audiences connection will be used in this demonstration. Before we go through the connection and activation workflow, let鈥檚 review a common use case for this one. A retail company wants to show customers personalized offers based on their purchases. They include customer email addresses as part of the data ingested into 蜜豆视频 Experience platform. Audiences are then built using this data and sent to the LinkedIn social platform, supporting advertising spend optimization. Whether you鈥檙e a product administrator or marketer setting up connections and activating data from the real-time CDP, you need proper permissions to support these activities. They include View and Activate destinations and View profile segments and identity graph. This requires a LinkedIn ad account and campaign manager with creative manager permission level or higher. In the Destinations Catalog interface, select the Social Category filter or scroll until you see the Social section with the relevant destination cards. We鈥檙e working with the LinkedIn Matched Audience card. You may see similar cards with a deprecated reference. If you鈥檙e interested to understand why multiple cards exist, refer to the documentation. To create a new destination, either select the Configure New Destination from the 3-picker or the Setup button if that鈥檚 what you see on the card. For a new connection, we鈥檒l work with the new account type. Then provide a name and description before selecting Connect to Destination. This part of the workflow requires LinkedIn account authentication. Provide your login credentials to sign in. Upon successful authentication with LinkedIn, allow permissions for Experience Platform to retrieve the advertising accounts, the name and photo, and the ability to create and manage matched audiences. Next, confirmation of a successful connection appears in the workflow in Experience Platform. New fields display at the bottom. Provide a name and description for the destination as well as the LinkedIn Campaign Manager account ID. The Next button at the top advances you to the next step in the workflow. This step allows you to define which governance policies should be enforced for this destination. It鈥檚 an optional step, however in this case, it makes sense to choose the Export to Third Party policy. The connection process to LinkedIn Matched Audiences is now complete. At this point, we鈥檙e moving forward into the activation workflow for this new destination account. Verify that the correct account is selected if you see multiples, and then choose Next to Advance. Previously, I reviewed a common use case for LinkedIn Matched Audiences. If you recall, I mentioned that the Email Address field is part of the data ingested into Experience Platform. This destination supports two identity matching values. One of those fields is Email Address, hashed with the SHA-256 algorithm. When choosing audiences in this step of the workflow, ensure Email Address is a likely field that would apply. For example, the page views audience isn鈥檛 likely to have an email associated with profiles that qualify for that audience, but purchasers is likely to have an associated email address. Mapping is a step where matching fields are selected between Experience Platform and LinkedIn. Open the Attribute Picker for the Source field, then select the Email Address field from the Experience Platform schema, and then choose Save. In the Target field, choose the Field Picker. The two identity matching choices display. Choose the Email Target field, then Save. If your Source field contains unhashed attributes, check the Apply Transformation option to have Experience Platform automatically hash the data on activation. Review the activation details and choose Finish if everything looks good. A successful activation programmatically creates a LinkedIn custom audience in Campaign Manager. Audience membership is adjusted as users are qualified or disqualified for the activated audiences. Thank you for joining us for this demonstration of creating a social destination connection and activating data to it in the Real-Time Customer Data Platform.
NOTE
The Experience Platform user interface is frequently updated and may have changed since the recording of this video. For the most up-to-date information, refer to the destination configuration tutorial.

Authenticate to destination authenticate

  1. Find the Facebook destination in the destination catalog and select Set Up.
  2. Select Connect to destination.
    Authenticate to Facebook step shown in the activation workflow.
  3. Enter your Facebook credentials and select Log In.

Refresh authentication credentials refresh-authentication-credentials

Facebook authentication tokens expire every 60 days. Once the token is expired, data exports to the destination stop working.

You can monitor your token expiration dates from the Account expiration date column in either the Accounts or the Browse tabs.

Facebook account token expiration date column in the Browse tab

Facebook account token expiration date column in the Accounts tab

To prevent token expiration causing interruptions in your activation dataflows, reauthenticate by performing the following steps:

  1. Navigate to Destinations > Accounts
  2. (Optional) Use the available filters on the page to display Facebook accounts only.
    Filter to show Facebook accounts only
  3. Select the account that you want to refresh, select the ellipsis and select Edit details.
    Select Edit details control
  4. In the modal window, select Reconnect OAuth and reauthenticate with your Facebook credentials.
    Modal window with Reconnect OAuth option
SUCCESS
Your authentication credentials are refreshed and their expiration time is reset to 60 days.

Fill in destination details destination-details

To configure details for the destination, fill in the required and optional fields below. An asterisk next to a field in the UI indicates that the field is required.

  • Name: A name by which you will recognize this destination in the future.
  • Description: A description that will help you identify this destination in the future.
  • Account ID: Your Facebook Ad Account ID. You can find this ID in your Facebook Ads Manager account. When entering this ID, always prefix it with act_.

Enable alerts enable-alerts

You can enable alerts to receive notifications on the status of the dataflow to your destination. Select an alert from the list to subscribe to receive notifications on the status of your dataflow. For more information on alerts, see the guide on subscribing to destinations alerts using the UI.

When you are finished providing details for your destination connection, select Next.

Activate audiences to this destination activate

IMPORTANT

See Activate audience data to streaming audience export destinations for instructions on activating audiences to this destination.

In the Segment schedule step, you must provide the Origin of audience when sending audiences to Facebook Custom Audiences.

Origin of Audience dropdown shown in the Facebook activation step.

Mapping example: activating audience data in Facebook Custom Audience example-facebook

Below is an example of correct identity mapping when activating audience data in Facebook Custom Audience.

Selecting source fields:

  • Select the Email namespace as source identity if the email addresses you are using are not hashed.
  • Select the Email_LC_SHA256 namespace as source identity if you hashed customer email addresses on data ingestion into Experience Platform, according to Facebook email hashing requirements.
  • Select the PHONE_E.164 namespace as source identity if your data consists of non-hashed phone numbers. Experience Platform will hash the phone numbers to comply with Facebook requirements.
  • Select the Phone_SHA256 namespace as source identity if you hashed phone numbers on data ingestion into Experience Platform, according to Facebook phone number hashing requirements.
  • Select the IDFA namespace as source identity if your data consists of Apple device IDs.
  • Select the GAID namespace as source identity if your data consists of Android device IDs.
  • Select the Custom namespace as source identity if your data consists of other type of identifiers.

Selecting target fields:

  • Select the Email_LC_SHA256 namespace as target identity when your source namespaces are either Email or Email_LC_SHA256.
  • Select the Phone_SHA256 namespace as target identity when your source namespaces are either PHONE_E.164 or Phone_SHA256.
  • Select the IDFA or GAID namespaces as target identity when your source namespaces are IDFA or GAID.
  • Select the Extern_ID namespace as target identity when your source namespace is a custom one.
IMPORTANT
Data from unhashed namespaces is automatically hashed by Experience Platform upon activation.
Attribute source data is not automatically hashed. When your source field contains unhashed attributes, check the Apply transformation option, to have Experience Platform automatically hash the data on activation.

Apply transformation control highlighted in the mapping step.

Exported data exported-data

For Facebook, a successful activation means that a Facebook custom audience would be created programmatically in . Audience membership would be added and removed as users are qualified or disqualified for the activated audiences.

TIP
The integration between 蜜豆视频 Experience Platform and Facebook supports historical audience backfills. All historical audience qualifications get sent to Facebook when you activate the audiences to the destination.

Troubleshooting troubleshooting

400 Bad Request error message bad-request

When configuring this destination, you may receive the following error:

{"message":"Facebook Error: Permission error","code":"400 BAD_REQUEST"}

This error occurs when customers are using newly created accounts, and the Facebook permissions are not yet active.

IMPORTANT
Make sure you accept the Facebook Custom Audience Terms of Service under business ID 206617933627973, as shown in the URL template in the account prerequisites section.

If you receive the 400 Bad Request error message after following the steps in Facebook account prerequisites, allow a few days for the Facebook permissions to come into effect.

recommendation-more-help
7f4d1967-bf93-4dba-9789-bb6b505339d6