This feature is in BETA version. For more information, contact your Customer Success Representative.
You can use the Facebook Offline Conversions BETA to send job results (in the form of offline event data) from Treasure Data directly to Facebook to measure how much your Facebook ads lead to real-world outcomes, such as purchases in your stores, phone orders, bookings, and more.
Basic Knowledge of Treasure Data.
Basic knowledge of Facebook Offline Conversions and Facebook Offline Event
To upload event data, you need access to one of the following on Facebook:
- Business Manager admin
- Admin system user who created the offline event set
- Admin on the
ad_accountconnected to the offline event set
You can use the CLI to configure your connection.
td query --database your_database --result configuration queryThe following table identifies the configuration keys with descriptions.
| Config Key | Type | Required | Description |
|---|---|---|---|
type | string | yes | facebook_offline_conversions |
access_token | string | Yes | A system user or long-lived access token |
app_secret | string | No | Facebook app secret |
event_set_id | long | Yes | Facebook offline event set ID. |
upload_tag | string | Yes | Use to track your event uploads |
match_keys | string | Yes | The identifying information used to match people on Facebook. The value is a comma-separated string. Example: email,phone,fn,ln,st,country… |
namespace_id | long | No | Scope used to resolve extern_id or tpid. Can be another data set or data partner ID. Example: 12345 |
skip_invalid | boolean | No | Use to terminate job (without revert) when invalid records are encountered. For example, a record is missing the required columns e.g. event_name, event_time... |
retry_limit | int | No | Maximum retry times for each API call. Default: 6 |
initial_retry_wait_msecs | long | No | Wait time for the first retry. Default: 60000 milliseconds |
max_retry_wait_msecs | long | No | Maximum time between retries. Default:30000 milliseconds |
connection_timeout_secs | long | No | The amount of time before the connection times out when doing API calls. Default: 300 seconds |
write_timeout_secs | long | No | The amount of time waiting for writing data into the request. Default: 180 |
read_timeout_secs | long | No | The amount of time waiting for reading data from the response. Default: 60 |
td query --database my_db \
--result '{
"type": "facebook_offline_conversions",
"access_token": "xxx"
"app_secret": "yyy"
"event_set_id: 361738844830373,
"upload_tag": "store_data"
}' \
'SELECT email, fn, ln, event_time, event_name, value, currency from your_table'Learn about supported query column names.
Make sure to review: