Data In |
CSV for events should be located in /data/in/tables/imports.csv for events, /data/in/tables/custom_data_contents.csv for custom data content.
The loader requires CSV files as input:
Imports.csv files that contain event data in each line
and optionally customer_data_contents.csv that contains Customer Data Contents data in each line.
Imports.csv events file structure:
event_name,event_time,event_id,custom_value,custom_currency,custom_content_name,custom_content_category,custom_content_ids,custom_content_type,custom_order_id,custom_predicted_ltv,custom_num_items,custom_search_string,custom_status,custom_delivery_category,user_email,user_phone,user_gender,user_date_of_birth,user_last_name,user_first_name,user_city,user_state,user_zip,user_country,user_external_id,user_client_ip_address,user_client_user_agent,user_click_id,user_browser_id,user_subscription_id,user_facebook_login_id,user_lead_id
e.g.: Test,1627553825,asd,,,,,ABC123,,,,,,,,,,,,Joe,Doe,,,,,,,,,,,,
Available values for user_gender are m (male) or f (female).
Multiple values can be added to the column custom_content_ids by JSON array dumping.
Available values for custom_delivery_category are in_store , curbside or home_delivery .
event_name , event_time and at least one of user information (prefix user_ ) are required.
Customer_data_contents.csv file structure:
event_id,product_id,quantity,item_price,title,description,brand,category,delivery_category
e.g.: asd,ABC123,,,,,,,
Where event_id refers to event_id in the events file.
Available values for delivery_category are in_store , curbside or home_delivery .
Learn more: about column formatting please refer to the Facebook help website.
Warning: Requests to Facebook Conversion API are sent in batches of 1000 events, if any given event in a batch is invalid, the entire batch will be rejected.
event_name (required)
|
String
event_name is also used in deduplication.
|
event_time (required)
|
Integer, Unix timestamp
Warning: This needs to be earlier than 7 days ago otherwise, the request would be invalid.
|
user_gender (required)
|
String, m (male) or f (female)
|
at least one user's information is required
|
field with prefix user_ ,
eg. user_email , user_gender or user_external_id
|
custom_content_category
|
String
The category of the content associated with the event.
Example: grocer
|
custom_content_ids
|
Array(String)
The content IDs associated with the event, such as product SKUs for items in an AddToCart event: [ABC123 , XYZ789 ]. If content_type is a product, then your content IDs must be an array with a single string value. Otherwise, this array can contain any number of string values.
|
custom_content_name
|
String
The name of the page or product associated with the event. Example: lettuce .
|
custom_content_type
|
String
It should be set to product or product_group :
- Use product, if the keys you send represent products. Sent keys could be
content_ids or contents .
- Use
product_group , if the keys you send in content_ids represent product groups. Product groups are used to distinguish products that are identical but have variations such as colour, material, size or pattern.
|
custom_currency
|
String, must be valid ISO 4217 currency code
|
custom_data_contents
|
Array(Object)
object fields are id ,quantity , item_price
|
custom_delivery_category
|
String
Type of delivery for a purchase event. Supported values are:
in_store : Customer needs to enter the store to get the purchased product.
curbside : Customer picks up their order by driving to a store and waiting inside their vehicle.
home_delivery : Purchase is delivered to the customer's home.
|
custom_order_id
|
String
The order ID for this transaction as a String.
Example: order1234 .
|
custom_predicted_ltv
|
Float
The predicted lifetime value of a conversion event.
Example: 432.12 .
|
custom_num_items
|
String
Use only with InitiateCheckout events. The number of items that a user tries to buy during checkout.
Example: 4 .
|
custom_search_string
|
String
Use only with Search events. A search query made by a user. Example: lettuce .
|
custom_status
|
String
Use only with CompleteRegistration events. The status of the registration event, as a String.
Example: registered .
|
custom_value
|
Float
|
Learn more: about custom data fields, please refer to this article
|
event_id
|
String
This ID can be any unique string chosen by the advertiser. event_id is used to deduplicate events sent by both Facebook Pixel and Conversions API. event_name is also used in deduplication.
For deduplication, the eventID from a browser event must match the event_id in the corresponding server event.
Learn more: about event id from here.
|
user_browser_id
|
String, fbp browser cookie
Learn more: about fbp browser cookies here
|
user_city
|
String
|
user_click_id
|
String , fbc browser cookie
Learn more: about fbc browser cookies here
|
user_client_ip_address
|
String
|
user_country
|
String, lowercase two-letter country code.
Example: us
|
user_date_of_birth
|
String, yyyymmdd
Example: 19971226
|
user_email
|
String
|
user_external_id
|
String, any unique id from advertisers
Learn more: about external id here
|
user_facebook_login_id
|
Integer, ID issued by Facebook
Learn more: about ID issued by Facebook here
|
user_first_name
|
String
|
user_last_name
|
String
|
user_lead_id
|
Integer, ID from Facebook’s Lead Ads
Learn more: about ID from Facebook Lead Ads here
|
user_phone
|
String
|
user_state
|
String
|
user_subscription_id
|
String
|
user_zip
|
String
|
|