Facebook Marketing
Connect Facebook Marketing to sanda: what to prepare, the fields the connection form asks for, and how its data lands in your warehouse.
Connect Facebook Marketing
- Open the catalogue. In the console, go to Data · Connections and press New connection.
- Choose Facebook Marketing. It is listed under marketing and analytics; you can also search for it by name.
- Fill in the form. Enter the fields below. Credentials go straight to sanda’s sync engine and are never stored in sanda’s database.
- Choose what to sync. Pick the streams you want, and a sync mode for each. See choose what to sync.
- Run the first sync. sanda tests the connection, then lands each stream as a table in your warehouse.
Configuration fields
What the connection form asks for. Required fields are marked; the rest are optional.
| Field | Type | Required | Description |
|---|---|---|---|
| Ad Account ID(s) | array | Yes | The Facebook Ad account ID(s) to pull data from. The Ad account ID number is in the account dropdown menu or in your browser's address bar of your Meta Ads Manager. |
| Start Date | string | No | The date from which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DDT00:00:00Z. If not set then all data will be replicated for usual streams and only last 2 years for insight streams. |
| End Date | string | No | The date until which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DDT00:00:00Z. All data generated between the start date and this end date will be replicated. Not setting this option will result in always syncing the latest data. |
| Campaign Statuses | array | No | Select the statuses you want to be loaded in the stream. If no specific statuses are selected, the API's default behavior applies, and some statuses may be filtered out. |
| AdSet Statuses | array | No | Select the statuses you want to be loaded in the stream. If no specific statuses are selected, the API's default behavior applies, and some statuses may be filtered out. |
| Ad Statuses | array | No | Select the statuses you want to be loaded in the stream. If no specific statuses are selected, the API's default behavior applies, and some statuses may be filtered out. |
| Fetch Thumbnail Images from Ad Creative | boolean | No | Set to active if you want to fetch the thumbnail_url and store the result in thumbnail_data_url for each Ad Creative. Default false. |
| Action breakdowns for the Built-in Ads Insight stream | array | No | Action breakdowns for the Built-in Ads Insights stream that will be used in the request. You can override default values or remove them to make it empty if needed. Default action_type,action_target_id,action_destination. |
| Custom Insights | array | No | A list which contains ad statistics entries, each entry must have a name and can contains fields, breakdowns or action_breakdowns. |
| Page Size of Requests | integer | No | Page size used when sending requests to Facebook API to specify number of records per page when response has pagination. Most users do not need to set this field unless they specifically need to tune the connector to address specific issues or use cases. Default 100. |
| Insights Lookback Window | integer | No | The attribution window. Facebook freezes insight data 28 days after it was generated, which means that all data from the past 28 days may have changed since we last emitted it, so you can retrieve refreshed insights from the past by setting this parameter. If you set a custom lookback window value in Facebook account, please provide the same value here. Default 28. |
| Insights Job Timeout | integer | No | Insights Job Timeout establishes the maximum amount of time (in minutes) of waiting for the report job to complete. When timeout is reached the job is considered failed and we are trying to request smaller amount of data by breaking the job to few smaller ones. If you definitely know that 60 minutes is not enough for your report to be processed then you can decrease the timeout value, so we start breaking job to smaller parts faster. Default 60. |
| Include Incrementality | boolean | No | If enabled, the incrementality attribution window will be included in the action attribution windows for all built-in insight streams. This allows you to retrieve incrementality data for action metrics. Default false. |
| Include Engaged View | boolean | No | If enabled, the engaged view (ev) attribution window will be included in the action attribution windows for all built-in insight streams. This surfaces attribution data for users who had an engaged view of a video ad (watched 10+ seconds or 97%+ of a short video). Default false. |
| Authentication | one of 2 options | Yes | Credentials for connecting to the Facebook Marketing API. |
Authentication
Credentials for connecting to the Facebook Marketing API.
Choose one of the following. Each asks for its own fields.
Authenticate via Facebook Marketing (Oauth)
| Field | Type | Required | Description |
|---|---|---|---|
| Access Token | string, secret | No | The value of the generated access token. From your App’s Dashboard, click on "Marketing API" then "Tools". Select permissions ads_management, ads_read, read_insights, business_management. Then click on "Get token". |
| Client ID | string, secret | Yes | Client ID for the Facebook Marketing API. |
| Client Secret | string, secret | Yes | Client Secret for the Facebook Marketing API. |
Service Account Key Authentication
| Field | Type | Required | Description |
|---|---|---|---|
| Access Token | string, secret | Yes | The value of the generated access token. From your App’s Dashboard, click on "Marketing API" then "Tools". Select permissions ads_management, ads_read, read_insights, business_management. Then click on "Get token". |
Related
Something unclear or out of date? Tell us, and we will fix the page.