Skip to content
Last updated

Migration Guide To Facebook Conversion Connector

Parameter configuration

The Facebook Conversions export integration setup is as below:

Parameter NamesRequiredNotes
pixel_idYesThe Facebook Pixel ID and obtain it in Facebook Event Manager. It must create via Facebook Offline data source.
access_tokenYesThe access token and obtain from Facebook Business Manager (Ref here for more info Get Started - Conversions API - Documentation - Meta for Developers )
test_event_codeNoIt’s used for testing purpose only
pre_hashed_columnsNoList of pre-hashed columns and separated by comma
skip_invalidNoOptional parameter to control skip job or not when it handle the invalid records.

Query field names mapping

The table below will list the mapping query column between Facebook Offline Conversions export integration and Facebook Conversions integration.

Facebook Offline Conversions (Column Name)Facebook Conversions (Column Name)Data TypeRequired?Notes
event_nameevent_namestringY
event_timeevent_timelongYEvent time in milliseconds and it has occurred within the last 7 days.
currencyIt moves to attribute of custom_data fielddoubleNE.g., "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
valueIt moves to attribute of custom_data fieldlongNE.g., "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
content_typeIt moves to attribute of custom_data fieldstringNThe supported values are: product or product_group E.g., "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
contentsIt moves to attribute of custom_data fieldstring (Serialized json array of object)NE.g., "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
custom_datacustom_datajson or string (Object must be in JSON string format and escape double quote)NE.g. "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
order_idIt moves to attribute of custom_data fieldstringNE.g., "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
item_numberIt move to attribute of custom_data field with new key num_itemslongNE.g., "custom_data": { "currency": "USD", "value": "142.52", "content_type": "product", "contents": [{"id":123, "quantity": 2, "item_price":5.99}], "order_id": "order_123", "num_items": "5" }
data_processing_optionsdata_processing_optionsstringN
data_processing_options_countrydata_processing_options_countrylongN
data_processing_options_statedata_processing_options_statelongN
emailemstringNThe Facebook Offline Conversions output connector can support multiple email column, but Facebook Conversions output connector support only 1 email column
phonephstringNThe Facebook Offline Conversions output connector can support multiple phone column, but Facebook Conversions output connector support only 1 phone column
gengestringN
dobydbstringNMerge 3 columns: doby, dobm, dobd to one column db in Facebook Conversions output connector Format: YYYYMMDD
dobm
dobd
lnlnstringN
fnfnstringN
fiFirst name initials - Not supported in Facebook Conversions API refer: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
ctctstringN
stststringN
zipzpstringN
countrycountrystringN
madidmobile advertiser ID, the advertising ID from an Android device or the Advertising Identifier (IDFA) from an Apple device. Note: This parameter is for app events only refer: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
external_idexternal_idstringN
lead_idlead_idlongN
action_sourcestringYThe additional field in Facebook Conversions output connector to indicate the offline event and value must set to physical_store

Sample queries

SELECT
  event_name,
  event_time,
  custom_data,
  data_processing_options,
  data_processing_options_country,
  data_processing_options_state,
  em,
  ph,
  ge,
  db,
  ln,
  fn,
  ct,
  ct,
  st,
  zp,
  country,
  external_id,
  lead_id,
  action_source
FROM
  TABLE_NAME