You can use the Facebook Conversions BETA to send job results (in the form of 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.
This topic contains:
Basic Knowledge of Treasure Data.
Basic knowledge of Facebook Conversions and Facebook Event
To upload event data, you need access to one of the following on Facebook:
- Business Manager admin
- Admin system user who created the event set
- Admin on the ad_account connected to the 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_conversions |
| access_token | string | Yes | A long-lived access token |
| pixel_id | string | No | Facebook Pixel ID |
| test_event_code | string | Yes | Facebook event set ID |
| 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... |
td query --database my_db \
--result '{"type": "facebook_conversions","access_token": "xxx","pixel_id": "yyy","test_event_code": "361738844830373", "skip_invalid": true}'\
'SELECT event_name, event_time, email as em from your_table'Learn about supported query column names.
Make sure to review: