> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Facebook Ads source for ELT & CDC

> Configure Facebook Ads as a data source in Integrate.io ELT & CDC. Replicate ad campaign performance and spend data to your data warehouse.

|                           |                                                                                                    |
| :------------------------ | :------------------------------------------------------------------------------------------------- |
| **Description**           | With a few clicks, you can run *ads* across *Facebook*, Instagram, Audience Network and Messenger. |
| **Supported Replication** | Initial Sync, Continuous Sync                                                                      |
| **Authentication Type**   | OAuth                                                                                              |

## Collections

| **Collection Name**                                                                                                                                                                                     | **Full/** **Initial Sync** | **Incremental/** **Continuous Sync** | **Supports Update** | **Supports Delete** | **Notes**                                                                            |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------- | :----------------------------------- | :------------------ | :------------------ | :----------------------------------------------------------------------------------- |
| Ad creatives      [https://developers.facebook.com/docs/marketing-api/reference/ad-creative](https://developers.facebook.com/docs/marketing-api/reference/ad-creative)                                  | ✔                          | ✖                                    | ✔                   | ✖                   | •                                                                                    |
| Ads      [https://developers.facebook.com/docs/marketing-api/reference/adgroup](https://developers.facebook.com/docs/marketing-api/reference/adgroup)                                                   | ✔                          | ✔                                    | ✖                   | ✖                   |                                                                                      |
| Ads insights      [https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights](https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights)                        | ✔                          | ✔                                    | ✖                   | ✖                   | "breakdowns": \[]                                                                    |
| Ads insights by age and gender      [https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights](https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights)      | ✔                          | ✔                                    | ✖                   | ✖                   | "breakdowns": \['age', 'gender']                                                     |
| Ads insights by country      [https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights](https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights)             | ✔                          | ✔                                    | ✖                   | ✖                   | "breakdowns": \['country']                                                           |
| Ads insights by dma      [https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights](https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights)                 | ✔                          | ✔                                    | ✖                   | ✖                   | "breakdowns": \['dma']                                                               |
| Ads insights by hourly advertiser      [https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights](https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights)   | ✔                          | ✔                                    | ✖                   | ✖                   | 'breakdowns': \['hourly\_stats\_aggregated\_by\_advertiser\_time\_zone']             |
| Ads insights by platform and device      [https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights](https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights) | ✔                          | ✔                                    | ✖                   | ✖                   | "breakdowns": \['publisher\_platform',   'platform\_position', 'impression\_device'] |
| Ads insights by region      [https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights](https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights)              | ✔                          | ✔                                    | ✖                   | ✖                   | 'breakdowns': \['region']                                                            |
| Ad sets      [https://developers.facebook.com/docs/marketing-api/reference/ad-campaign](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign)                                       | ✔                          | ✔                                    | ✖                   | ✖                   |                                                                                      |
| Campaigns      [https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group)                         | ✔                          | ✔                                    | ✖                   | ✖                   |                                                                                      |
| Leads      [https://developers.facebook.com/docs/marketing-api/guides/lead-ads/](https://developers.facebook.com/docs/marketing-api/guides/lead-ads/)                                                   | ✔                          | ✔                                    | ✖                   | ✖                   |                                                                                      |

## Deleted records

Syncs from Facebook Ads include records with a `DELETED` status. Deleted ads, ad sets, and campaigns land in your destination alongside active records so you retain historical reporting after items are removed in Facebook Ads Manager. Filter on the status field in your warehouse to exclude deleted records from downstream queries.

## Historical Window

Facebook's historical data availability varies by data type:

| Data Type                                    | Historical Window            |
| :------------------------------------------- | :--------------------------- |
| Standard total metrics                       | 37 months                    |
| Unique-count metrics (such as unique clicks) | 13 months                    |
| Hourly breakdowns                            | 13 months                    |
| Reach with breakdowns                        | \~13 months (about 394 days) |
| Frequency breakdowns                         | 6 months                     |

## Data Lookback

Facebook attributes some conversions days after they occur. On each sync, the connector re-reads recent Ads Insights data so it captures late-attributed conversions.

The lookback window is configurable per pipeline. In your pipeline's **Sync Settings**, set **Facebook Insights Lookback Window** to one of the following values:

| Lookback Window  |
| :--------------- |
| 1 day            |
| 7 days (default) |
| 14 days          |
| 28 days          |

A larger window improves reporting accuracy for the Ads Insights collections. It also increases the number of rows synced on each run, which counts toward your usage.

### Setting up Facebook Ads for ELT & CDC

#### Overview

ELT & CDC uses the Marketing API provided by Facebook to sync the data. [Facebook Marketing API reference](https://developers.facebook.com/docs/marketing-apis)

#### Requirements

* You need to authenticate using OAuth.
* Sign In and Authenticate.

<Frame>
  <img src="https://mintcdn.com/integrateio/SIDFEDRgXpxG0yrn/images/cdc/sources/image-31.png?fit=max&auto=format&n=SIDFEDRgXpxG0yrn&q=85&s=be35411d2173f7d6bfbaf0bf918e0e48" alt="Facebook Ads OAuth sign-in and authentication prompt" width="1158" height="1132" data-path="images/cdc/sources/image-31.png" />
</Frame>
