If your event does not contain any of traits.action_source, context.traits.action_source, or properties.action_source, then RudderStack falls back to the value specified in the Action Source dashboard setting.
Do not set action_source to any value other than the following - otherwise you will get a Invalid Action Source type error:
email
website
phone_call
chat
physical_store
system_generated
app, and
other
User data
The following table lists the mappings between the RudderStack properties and the Facebook properties included in user_data:
After the payload is formed, Facebook checks if name field exists. If yes, it is split into fn and ln fields. Facebook does not hash the values of user_data parameters if you send an integrations object in your event as below:
"integrations":{"fb_conversions":{"hashed":true}}
RudderStack accepts any of the following names for Facebook Conversions in the integrations object:
fb_conversions
fb conversions
FacebookConversions
Facebook Conversions
FB Conversions
Facebook_Conversions
Custom data
RudderStack flattens the custom_data object before sending it Facebook along with the user_data and common_data fields in the data object.
Note that:
RudderStack sends the properties present in custom_data as is, without any change.
It also excludes opt_out, event_id, and action_source from the event properties.
The following table explains how RudderStack maps and sets the properties in the specific Facebook fields:
Each of the below parameters are applicable/valid only for certain events.
See Standard events mapping for more information on the properties mapped for each Facebook property according to the event.
RudderStack property
Facebook property
Array of product IDs from properties.products like product.product_id, product.sku, product.id.
content_ids
Array of object containing id, quantity, and item_price formed for each product in properties.products.
contents
properties.content_type
content_type
properties.category
content_category
properties.content_name or properties.contentName if properties.products array is not present.
properties.name or properties.product_name if properties.products array is present.
content_name
properties.currency - defaulted to USD if no value is present.
If content_category is passed as an array, RudderStack merges the array elements as a comma-separated string.
If content_category is passed as an object, RudderStack throws an error: "Category must be must be a string."
PII properties
Facebook identifies the following event properties as PII properties:
email
firstName
lastName
first_name
last_name
gender
city
country
phone
state
zip
birthday
If any mapped custom_data property is among the above properties, RudderStack checks if the property is allowlisted. If no, it is dropped.
If the property is denylisted, RudderStack checks if the Denylist PII Hash Property toggle is turned on in the dashboard. If no, it is dropped. Otherwise, RudderStack hash-encrypts it before sending to Facebook.
As mentioned above, if you send an integrations object within your event with hashed set to true, RudderStack does not hash the property again.
"integrations":{"fb_conversions":{"hashed":true}}
App data
RudderStack includes this data only if action_source in the data object is set to app.
The following table lists the mappings between the RudderStack properties and the Facebook properties:
RudderStack property
Facebook property
a2 if context.device.type = android i2 if context.device.type = ios Required
For the Purchase standard event (mapped to Order Completed event), properties.revenue is a required field. Also, RudderStack sends the delivery_category field along with id, item_price and quantity as a part of the custom_data.contents object.
For the Products Searched event, the query property must be a string.
If you map an event with the ViewContent standard event using the RudderStack dashboard setting and don’t send the products array in the message.properties object:
Default values for the currency and quantity properties are USD and 1 respectively.
content_ids field is populated from the products array. If the products array is not present in the properties, content_ids is set to an empty array resulting in num_items being set to 0.
Other standard events
If you map your event to any of the following Facebook standard events, then RudderStack treats it as a standard event as well:
Lead
CompleteRegistration
Contact
CustomizeProduct
Donate
FindLocation
Schedule
StartTrial
SubmitApplication
Subscribe
For any properties you want to send with these events, you must specify them in the Event Mapping settings.
For the above-mentioned events and custom events, Rudderstack sends content_ids and num_items to Facebook as a part of properties in the appropriate format.
Deduplication
Facebook allows you to send events via your web browser and your server via the Conversion API. Depending on how you send your events with this duel setup, there is a possibility of Facebook receiving redundant/duplicate events. Hence, to get an accurate representation of your data, Facebook deduplicates the incoming events.
Using event_id
Facebook’s (and RudderStack’s) recommended deduplication strategy is to leverage the event_name and event_id properties. When two events coming into Facebook meet the following criteria, they are deduplicated.
They are sent within 48 hours of each other.
They are received by the same Facebook Pixel ID.
They have the same event_name, for example, Purchase.
They have the same event_id.
The event_id must be unique to that specific event and same for both of the events. For example, the event_id could be a purchase order number.
You can set the event_id as a unique identifier in the event’s traits, context.traits, or the properties object. RudderStack automatically picks up the event_name from the event.
If you don’t set the event_id, RudderStack uses messageId and maps it to Facebook’s eventId.
This deduplication strategy is not recommended as it has a few drawbacks:
It will always discard the server event if Facebook identifies a redundant event.
It only works for deduplicating events sent first from the browser and then the server.
There is no deduplication if two consecutive browser events with the same information are sent to Facebook. The same is true if two server events with the same information are sent to Facebook.
For this approach, it is necessary to send an event, first from the browser and then from the server. Note that both events must have the same event_name, the same fbp parameter, and the same external_id.
If the browser event is received before the server event and both events have the same event_name and the same fbp and external_id, then the server event is discarded.
RudderStack maps the event_name from the event sent to Facebook. The fbp parameter is taken from the context.fbp key-value pair. Finally, the external_id will be the userId or anonymousId (if userId is not present).
Click the All tools hamburger menu in the left sidebar.
Select Events Manager.
Select the data source associated with your ad campaign.
Here, you can view your conversion events tracked by Facebook Pixel, app, or offline event sets - this includes the standard and custom events that you have set up.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
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.
This site uses cookies to improve your experience. If you want to
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.