Facebook Offline Conversions lets you measure your sales in the offline world, resulting through your online Facebook ads. It helps you leverage the offline events data by tracking the in-store purchases, phone orders, bookings, etc.
Getting started
RudderStack supports sending event data to Facebook Offline Conversions via the following connection modes:
| Connection Mode | Web | Mobile | Server | 
|---|---|---|---|
| Device mode | - | - | - | 
| Cloud mode | - | Supported | Supported | 
Once you have confirmed that the source platform supports sending events to Facebook Offline Conversions, follow these steps:
- From your RudderStack dashboard, add the source. Then, from the list of destinations, select Facebook Offline Conversions.
 - Assign a name to your destination and click Continue.
 
Connection settings
To successfully configure Facebook Offline Conversions as a destination, you will need to configure the following settings:
- System User Access Token: Enter your system user access token from the Facebook Business account. Refer to the FAQ section for more information on obtaining the access token.
 - Map your events with Facebook Standard Events: Use this setting to map the standard Facebook events with custom event names. You can map one or more custom events to a standard Facebook event but not vice-versa.
 - Map Facebook Standard Events With Event Set IDs: Use this setting to map the standard Facebook events (specified in the above setting) to Facebook event set ID's. You can map one or more standard Facebook events to event set ID's and vice-versa. Refer to the FAQ section for more information on obtaining the event set ID's.
 
- Map Categories to Facebook Content Types: Enter the category value and the corresponding Facebook 
content_typewhich should be mapped to each other. Thiscontent_typeis sent to Facebook every time you send the specified category value via RudderStack. Refer to the Sending customcontent_typesection for more information on sending the customizedcontent_typeto Facebook. - Value Field Identifier: Enter the identifier you want to assign to the 
valuefield in Facebook's event payload. The default value is set toproperties.value. - Limited Data Usage: Enable this setting to let RudderStack take the data processing information from the payload and send it to Facebook.
 - Enable Hashing: This setting is enabled by default and hash encodes the user data using 
SHA256. Facebook expects the user data to be hash encoded. 
Track
You can use the track call to capture user events along with the properties associated with them.
track conversions within 62 days of the occurrence of offline conversions.The event name sent in the track call must be mapped in the Map Facebook Standard Events With Event Set IDs RudderStack dashboard setting otherwise, an error is thrown.
A sample track call is shown below:
rudderanalytics.track({  userId: 'user@1',  event: 'Product Added',  properties: {    products: [{      id: 1,      category: 'Games',      brand: 'Hasbro',      price: 18.99,      quantity: 1,    }],    order_id: 'cart1234',    price: 18.99,    currency: "USD"  },  traits: {    email: 'alex@example.com',    phone: '+1-202-555-0146',    gender: 'male',    firstName: 'Alex',    lastName: "Keener",    address: {      city: 'New Orleans',      state: 'Louisiana',      postalCode: '90009',      country: 'USA'    }  },  context: {    "dataProcessingOptions": [      [        "LDU"      ],      1,      1000    ],  }});If your server has access to Facebook's leadId from their Lead Ads product, you can choose to send it using the integration specific options. The leadId is mapped via externalId, as shown:
"externalId": [  {  "id": "leadId-value",  "type": "LeadId"  }, ]Property mappings
The following table lists the event property mappings between RudderStack and Facebook Offline Conversions:
| RudderStack property | Facebook Offline Conversions property | Notes | 
|---|---|---|
userId traits.userIdtraits.idcontext.traits.userIdcontext.traits.idanonymousId Required  | extern_id | - | 
originalTimestamp timestamp  Required  | event_time | Unix timestamp. The default value is the current timestamp. | 
event   Required  | event_name | - | 
properties.currency   Required  | currency | If not provided, the default value is set to USD. | 
properties.totalproperties.priceproperties.valueproperties.revenue Required  | value (currency value) | If not provided, the default value is set to 0. | 
properties.upload_tag | upload_tag | The default value is set to RudderStack. | 
properties.item_number | item_number | - | 
properties.order_idproperties.orderId | order_id | - | 
properties | custom_data | - | 
properties.products | contents | - | 
traits.emailcontext.traits.email properties.email context.externalId.0.id | email | - | 
traits.phonecontext.traits.phoneproperties.phone | phone | - | 
traits.gendercontext.traits.gender | gen | - | 
traits.birthdaycontext.traits.birthdaytraits.dateOfBirthcontext.traits.dateOfBirthtraits.dateofbirthcontext.dateofbirthtraits.dobcontext.traits.dobtraits.DOBcontext.traits.DOB | doby | The expected format is DD, MM, YYYY. RudderStack extracts the year, month, and day before sending it to Facebook Offline Conversions. | 
traits.firstNametraits.firstnametraits.first_namecontext.traits.firstNamecontext.traits.firstnamecontext.traits.first_name | fn | - | 
traits.lastNametraits.lastnametraits.last_namecontext.traits.lastNamecontext.traits.lastnamecontext.traits.last_name | ln | - | 
traits.address.citycontext.traits.address.city | ct | - | 
traits.statecontext.traits.state | st | - | 
traits.ziptraits.zipcodetraits.zip_codetraits.zipCodetraits.postalcodetraits.postal_codetraits.postalCodetraits.address.zipcodetraits.address.zip_code | zip | - | 
traits.countrycontext.traits.country | country | - | 
context.device.advertisingId | madid | - | 
context.userAgent | client_user_agent | - | 
traits.action_sourcecontext.traits.action_sourceproperties.action_source | action_source | - | 
context.page.urlproperties.url | event_source_url | - | 
context.fbc | fbc | - | 
context.fbp | fbp | - | 
Note the following important points while sending event data to Facebook Offline Conversions:
- At least one 
match_keyis required to send an event successfully. RudderStack uses SHA256 encoding to hash all thematch_keysthat include personally identifiable data in compliance with Facebook's privacy requirements. - If you send a 
productsarray using thepropertiesobject, RudderStack sends only theid,quantity,brand,category, andpriceproperties for each product. The reason is that Facebook throws an error on encountering any property apart from these. - If you send an event name as Product List Viewed, the value of 
content_typekey is set asproduct_groupotherwise, it is set asproduct. - RudderStack sends a conversion event as long as it contains a 
userId. However, it is recommended to send as much user data throughcontext.traitsfor better attribution results. - You can send either the 
firstNameandlastNameseparately or just thenameproperty. RudderStack maps it tofnandlnon its own. 
Sending custom content_type
You can either send the custom content_type by specifying it in the Map Categories to Facebook Content Types dashboard setting or via the integrations object, as shown:
"integrations": {  "FacebookOfflineConversions": {    "contentType": "sending dedicated content type for this particular payload"  }}The priority order of setting the content_type value is as follows:
content_typeprovided in theintegrationsobject is given the highest priority.content_typeprovided in the RudderStack dashboard is given the second highest priority.- If none of the above is provided, the 
content_typeis set toproductby default, except in the following cases: 
- If Product List Viewed event is sent:
- with 
productsarray, then thecontent_typeis set toproduct. - without the 
productsarray, then thecontent_typeis set toproduct_group. 
 - with 
 - If Product Viewed event is mapped in the RudderStack dashboard, then the 
content_typeis set toproduct. - If Product Viewed event is not mapped in RudderStack dashboard (default mapping is set to View Content event) and is sent:
- with 
productsarray, then thecontent_typeis set toproduct. - without the 
productsarray, then thecontent_typeis set toproduct_group. 
 - with 
 - If any other event is mapped to the Facebook standard event View Content in the RudderStack dashboard and is sent:
- with 
productsarray, then thecontent_typeis set toproduct. - without the 
productsarray, then thecontent_typeis set toproduct_group. 
 - with 
 
FAQ
Where can I find the System User Access Token?
- Log in to the Facebook Business account.
 - Go to Business Settings > Users > System users.
 - Click Generate New Token, select your app from the dropdown, and ads_management permission.
 - Click Generate Token as shown:
 
    Where can I find the event set ID in Facebook dashboard?
- Log in to the Facebook Business account.
 - Go to Business Settings > Data Sources > Offline event sets and select Open in Events Manager. You can see the event set ID as shown:
 
    Which permissions are required to upload the offline event data?
Refer to the Facebook dcoumentation to know about the detailed permissions required to upload offline event data.
Contact us
For more information on the topics covered on this page, email us or start a conversation in our Slack community.