Send your event data from RudderStack to Facebook Pixel.
This guide will help you set up Facebook Conversions as a destination in RudderStack.
In your RudderStack dashboard, go to Directory > Destinations > Cloud Destinations and search for Facebook Conversions.
Connect your source and click Continue.
Configure the following settings to set up Facebook Conversions as a destination in RudderStack:
Name: Assign a name to uniquely identify the destination.
Dataset ID: Enter the dataset ID. If an existing pixel is linked to your dataset, your dataset ID will be the same as your Pixel ID.
Business Access Token: Enter the business access token from your Facebook business account. This is required to send events in cloud mode. For more information on obtaining the business access token, see the FAQ.
RudderStack supports sending event data to Facebook Conversions only via cloud mode.
After completing the initial setup, configure the following settings to correctly receive your data in Facebook:
Action Source: From the dropdown, select the fallback action_source value you want to set ifaction_source is not present in your event properties. RudderStack provides the following options:
Limited Data Usage: If turned on, RudderStack takes the data processing information from the payload and sends it to Facebook. The data in the RudderStack payload should be in the following format:
If this setting is turned on, RudderStack maps the values in the context.dataProcessingOptions array to commonData.data_processing_options, commonData.data_processing_options_country, and commonData.data_processing_options_state fields.
You can set the value of the fbc parameter using the context.fbc field as shown in the above payload.
If not set explicitly, RudderStack autogenerates it using the following values:
Fetches fbclid from context.page.url.
Uses originalTimestamp as the creation time.
Sets subdomainIndex to 1.
Sets version to fb.
Use as Test Destination: Turn on this setting if you are using this destination for testing purposes and enter the Test Event Code. You can find this code in your Facebook dashboard. When turned on, you can check your events in the Facebook dashboard in realtime.
Don’t send external_id for user: If turned on, RudderStack does not send either userId or anonymousId as the external_id to Facebook.
Client-side event filtering: Specify the events to be discarded or allowed to flow through. For more information, see Client-side Event Filtering.
OneTrust cookie consent settings: This setting lets you associate the OneTrust cookie consent groups to Facebook Conversions.
Ketch consent settings: This setting lets you associate the Ketch cookie consent groups to Facebook Conversions.
Click the Set up mapping button to map your RudderStack events and properties to specific Facebook events/properties. You can also use the JSON mapper to set these mappings.
RudderStack provides the following options:
You can map a RudderStack category to a specific Facebook content type.
You can map a RudderStack event to a specific Facebook standard event.
RudderStack provides two options in this setting:
Denylist PII Properties: RudderStack drops the PII properties specified in this field. However, if you toggle on the Denylist PII Hash Property setting, RudderStack encrypts the properties in SHA256 format before sending them to Facebook. The following properties are the default denylisted properties:
To hash and send any of the above properties, enter the property name in the Denylist PII Properties field and toggle on the Denylist PII Hash Property toggle.
Allowlist PII Properties: The PII properties mentioned in this field are sent to Facebook if they are present in the event’s properties.
Where can I find the dataset ID?
To get your dataset ID, go to your Facebook Ads Manager account. From the left navigation bar, select Business Tools, and click Events Manager under Manage Business.
You should be able to see the ID underneath your site name under Data Sources:
Where can I find the Business Access Token?
In order to use the Facebook Conversions API, you need to generate an access token using the Facebook Events Manager:
Choose the relevant Facebook Pixel and click the Settings tab.
In the Conversions API section, click Generate access token under the Set up manually section:
Can I hash my event data before sending it to RudderStack?
Yes. Facebook requires all user data, including data coming from context.traits, to be hashed. This includes email, phone, birthday, address, etc. By default, RudderStack automatically hashes all of the necessary properties for you. However, to hash these traits before sending to RudderStack, you need to send your event as follows:
RudderStack accepts any of the following names for Facebook Conversions in the integrations object:
The integrations object with these key-values notifies RudderStack to not hash the traits in context.traits as they are already hashed. Otherwise, RudderStack will hash your data again and Facebook will not be able to match the traits. Keep in mind that Facebook rejects any un-hashed data.
Why can’t I can see my events in the RudderStack dashboard but not in the Facebook dashboard?
It may take up to 24 hours for your events to reflect in the Facebook dashboard. You can also verify if your events are flowing correctly by enabling the Use as Test Destination setting in the RudderStack dashboard. It reflects the events in the Facebook dashboard in real time.
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
for the working of basic functionalities of the website. We also use third-party cookies that
analyze and understand how you use this website. These cookies will be stored in your browser
consent. You also have the option to opt-out of these cookies. But opting out of some of these
have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.