Skip to main content Skip to complementary content
Already have an account? Sign in

Facebook Ads (v1)

Last updated: 9/15/2026

Facebook Ads integration summary

Stitch’s Facebook Ads integration replicates ad, campaign, and adcreative data using the Facebook Marketing API 10.0.

Note: This integration does not currently support replicating data for reviews, pages, etc.

Refer to the Schema section for a list of objects available for replication.

Facebook Ads feature snapshot

A high-level look at Stitch's Facebook Ads (v1) integration, including release status, useful links, and the features supported in Stitch.

STITCH
Release status

Released on September 11, 2017

Supported by

Stitch

Stitch plan

Standard

API availability

Available

Singer GitHub repository

singer-io/tap-facebook

REPLICATION SETTINGS
Anchor Scheduling

Supported

Advanced Scheduling

Unsupported

Table-level reset

Supported

Configurable Replication Methods

Unsupported

DATA SELECTION
Table selection

Supported

Column selection

Supported

Select all

Supported

TRANSPARENCY
Extraction Logs

Supported

Loading Reports

Supported

Connecting Facebook Ads

Facebook Ads setup requirements

To set up Facebook Ads in Stitch, you need:

  • Verify your access in Facebook Ads. If the user who creates the integration has restricted permissions - meaning the user doesn’t have access to all campaigns or ads - Stitch may encounter issues replicating data.

    Even if you only intend to sync certain pieces of data post-setup, the user completing the initial setup should still have full access.

  • Pause all ad-blocking software currently in use. Because Facebook authentication uses pop ups, you may encounter issues if ad blockers aren’t disabled during the setup.

Step 1: Add Facebook Ads as a Stitch data source

  1. Sign into your Stitch account.
  2. On the Stitch Dashboard page, click the Add Integration button.

  3. Click the Facebook Ads icon.

  4. Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.

    For example, the name “Stitch Facebook Ads” would create a schema called stitch_facebook_ads in the destination. Note: Schema names cannot be changed after you save the integration.

Step 1.1: Select an attribution window

An attribution window is the amount of time for attributing results to ads and the lookback period after those actions occur during which ad results are counted.

We recommend selecting the same attribution window you use in Facebook Ads to prevent discrepancies between Facebook’s UI and data replicated by Stitch. For example: If the attribution window in Facebook Ads is 7 days, you should define this setting as 7 days.

Then, during every replication job, Stitch will replicate the past seven days’ worth of data to account for result attribution. This will ensure that records updated during the attribution period are correctly captured by Stitch.

For more info, see the Attribution windows and data extraction section.

Step 1.2: Include deleted data

Check the Include data from deleted campaigns, ads, and adsets box to have Stitch replicate data for these deleted objects.

Note: Data for deleted campaigns, ads, and adsets will be included only in Core Object tables.

Step 2: Define the historical replication start date

The Sync Historical Data setting defines the starting date for your Facebook Ads integration. This means that data equal to or newer than this date will be replicated to your data warehouse.

Change this setting if you want to replicate data beyond Facebook Ads’s default setting of 1 year. For a detailed look at historical replication jobs, check out the Syncing Historical SaaS Data guide.

Step 3: Create a replication schedule

In the Replication Frequency section, you’ll create the integration’s replication schedule. An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.

Facebook Ads integrations support the following replication scheduling methods:

To keep your row usage low, consider setting the integration to replicate less frequently. See the Understanding and Reducing Your Row Usage guide for tips on reducing your usage.

Step 4: Authorize Stitch to access Facebook Ads

  1. After clicking the Authorize button, a small pop-up window will display.

    You’ll be taken through a series of steps to allow Stitch to access data from your Public Profile, Facebook Ads, and related stats.

  2. Click Okay to advance through these steps.
  3. After you’ve finished authorizing Stitch, you’ll be prompted to select the Facebook Ad Account you want to pull data from. Select the desired account by clicking the checkbox in the Connect column.

    If you don’t see the profiles that you would expect to, verify your Facebook Ads permissions before reaching out to support.

  4. Click the Save Connections button.

After your credentials are validated, you’ll be directed back to Stitch (click the All Done button to wrap things up) and the Integration Details page will display.

Step 5: Set objects to replicate

The last step is to select the tables and columns you want to replicate. Learn about the available tables for this integration.

Note: If a replication job is currently in progress, new selections won’t be used until the next job starts.

For Facebook Ads integrations, you can select:

  1. Individual tables and columns

  2. All tables and columns

Click the tabs to view instructions for each selection method.

  1. In the integration’s Tables to Replicate tab, locate a table you want to replicate.
  2. To track a table, click the checkbox next to the table’s name. A blue checkmark means the table is set to replicate.

  3. To track a column, click the checkbox next to the column’s name. A blue checkmark means the column is set to replicate.

  4. Repeat this process for all the tables and columns you want to replicate.
  5. When finished, click the Finalize Your Selections button at the bottom of the screen to save your selections.
  1. Click into the integration from the Stitch Dashboard page.
  2. Click the Tables to Replicate tab.

  3. In the list of tables, click the box next to the Table Names column.
  4. In the menu that displays, click Track all Tables and Fields:

    The Track all Tables and Fields menu in the Tables to Replicate tab
    The Track all Tables and Fields menu in the Tables to Replicate tab

  5. Click the Finalize Your Selections button at the bottom of the page to save your data selections.

Initial and historical replication jobs

After you finish setting up Facebook Ads, its Sync Status may show as Pending on either the Stitch Dashboard or in the Integration Details page.

For a new integration, a Pending status indicates that Stitch is in the process of scheduling the initial replication job for the integration. This may take some time to complete.

Free historical data loads

The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.

Facebook Ads replication

Attribution windows and data extraction

When Stitch runs a replication job for Facebook Ads, it will use the value of the Attribution Window setting to query for and extract data for Incremental tables. An attribution window is a period of time for attributing results to ads and the lookback period after those actions occur during which ad results are counted.

For example: If set to 7 days, Stitch will replicate the past seven days’ worth of data every time a replication job runs. While Stitch replicates data in this way to account for updates to records made during the attribution window, it can have a substantial impact on your overall row usage.

In the sections below are examples of how attribution windows impact how Stitch extracts data during historical and ongoing replication jobs.

For historical and full re-replications of Facebook Ads data, Stitch will query for and extract data newer than or equal to the date defined in the Start Date field in the Integration Settings page.

The Start Date, in conjunction with the Attribution Window, defines the minimum date Stitch should query for when extracting historical data. This is calculated as:

Start Date - Attribution Window = Minimum Extraction Date

Note: For the ads_insights stream, the Minimum Extraction Date cannot be more than 37 months ago.

Example

During the initial set up, the Attribution Window and Start Date settings are defined as:

  • Attribution Window: 28 days (default setting)
  • Start Date: 07/03/2017, or 2017-07-03 00:00:00

To account for the Attribution Window, Stitch would calculate the Minimum Extraction Date value as: 2017-07-03 00:00:00 - 28 days = 2017-06-05 00:00:00

If you were to write a SQL query using this date for the ads table, it might look like this:

  SELECT *
    FROM facebook_ads.ads
   WHERE updated_time >= '2017-06-05 00:00:00'   /* Min. Extraction Date */
ORDER BY updated_time

For ongoing replication jobs, Stitch will query for and extract data using the last saved maximum value in the table’s Replication Key column and the Attribution Window for the table.

Note: This applies to every replication job that takes place after the historical replication job.

Example

The last maximum saved Replication Key value for the ads table is 2017-10-01 00:00:00.

To account for the Attribution Window of 28 days, we’d subtract this from the last maximum saved Replication Key value:

2017-10-01 00:00:00 - 28 days = 2017-09-03 00:00:00

In this case, Stitch would query for and extract data that is newer than or equal to 2017-09-03 00:00:00 and older than or equal to 2017-10-01 00:00:00.

If this were a SQL query, it might look like this:

  SELECT *
    FROM ads
   WHERE updated_time >= '2017-09-03 00:00:00'
                              /* max Replication Key value - Attribution Window */
     AND updated_time <= '2017-10-01 00:00:00'
                              /* max Replication Key value from previous job */
ORDER BY updated_time

Attribution windows and row count impact

Due to the attribution window, a high Replication Frequency may not be necessary. Because Stitch will replicate data from the past N days during every replication job, recent data will be re-replicated and count towards your row quota.

To reduce your row usage and replicating redundant data, consider setting the integration to replicate less frequently. For example: every 12 or 24 hours.

Facebook Ads table reference

There are two types of tables in Stitch’s Facebook Ads integration: Core Object and Insights.

DMA to Comscore migration

Note: The ads_insights_dma table is deprecated because Meta removed DMA support on June 22, 2026. Use ads_insights_comscore_market for market-level geographic reporting.

What changed:

  • Old table: ads_insights_dma with dma field
  • New table: ads_insights_comscore_market with comscore_market field

Migration steps:

  1. In your Facebook Ads integration, deselect ads_insights_dma.
  2. Select ads_insights_comscore_market.
  3. Update any downstream queries and reports to use the new table and field name.

Note: Comscore Market IDs differ from DMA codes. Refer to Meta’s DMA to Comscore mapping table if needed.

  • Core Object tables contain foundational data that’s useful for analysis. These are the adcreative, ads, adsets, and campaigns tables. To learn more about how Facebook Ads data is structured, we recommend checking out their API guide.
  • Insights tables contain performance data for every campaign/adset/ad combination, segmented by day and demographics specific to each table. For example: The ads_insights_age_and_gender table is segmented by day, age, and gender.

adcreative

The adcreative table contains info about the creatives used in ads, in your Facebook Ads account.

This is a Core Object table.

Limits

Facebook’s API limits the number of ad creatives that can be retrieved through their API to 50,000, which is documented here. If you’re missing data from this table and have more than 50,000 ad creatives in your Facebook Ads account, this may be the cause of the discrepancy.

ads

The ads table contains info about the ads in your Facebook Ads account.

This is a Core Object table.

updated_time and querying

Because this table uses updated_time as part of the Primary Key, query results might return various versions of the same adgroup.

To reflect the latest state of the adgroup, use the latest updated_time timestamp.

Deleted ads

If the Include data from deleted campaigns, ads, and adsets box in the integration’s settings is checked, this table will include data for deleted ads.

Replication Method

Key-based Incremental

Primary Keys

id

updated_time

Replication Key

updated_time

Useful links

Facebook Ads documentation

ads schema on GitHub

Facebook Ads API method

ads_insights

The ads_insights table contains entries for each campaign/set/ad combination for each day, along with detailed statistics.

Note: Data for deleted ads, adsets, and campaigns will not appear in this table even if the Include data from deleted campaigns, ads, and adsets option in the integration’s settings is enabled.

Segmented insights data

To analyze data that’s been segmented by various characteristics, consider tracking some of the other ads_insights tables in this integration. The following tables contain the same fields as this one (ads_insights), but include additional dimensions to segment the data:

Replication Method

Key-based Incremental

Primary Keys

ad_id

adset_id

campaign_id

date_start

Replication Key

date_start

Useful links

Facebook Ads documentation

ads_insights schema on GitHub

ads_insights_age_and_gender

The ads_insights_age_and_gender table contains entries for each campaign/set/ad combination for each day, along with detailed statistics, segmented by age and gender.

This table contains the same fields as the ads_insights table, with the exception of age and gender.

Note: Data for deleted ads, adsets, and campaigns will not appear in this table even if the Include data from deleted campaigns, ads, and adsets option in the integration’s settings is enabled.

Replication Method

Key-based Incremental

Primary Keys

ad_id

adset_id

campaign_id

date_start

age

gender

Replication Key

date_start

Useful links

Facebook Ads documentation

ads_insights_age_and_gender schema on GitHub

ads_insights_comscore_market

The ads_insights_comscore_market table contains entries for each campaign/set/ad combination for each day, along with detailed statistics, segmented by Comscore Market.

This table contains the same fields as the ads_insights table, with the exception of comscore_market.

Note: Data for deleted ads, adsets, and campaigns will not appear in this table even if the Include data from deleted campaigns, ads, and adsets option in the integration’s settings is enabled.

Replication Method

Key-based Incremental

Primary Keys

ad_id

adset_id

campaign_id

comscore_market

date_start

Replication Key

date_start

Useful links

Facebook Ads documentation

ads_insights_comscore_market schema on GitHub

ads_insights_country

The ads_insights_country table contains entries for each campaign/set/ad combination for each day, along with detailed statistics, segmented by country.

This table contains the same fields as the ads_insights table, with the exception of country.

Note: Data for deleted ads, adsets, and campaigns will not appear in this table even if the Include data from deleted campaigns, ads, and adsets option in the integration’s settings is enabled.

Replication Method

Key-based Incremental

Primary Keys

ad_id

adset_id

campaign_id

date_start

country

Replication Key

date_start

Useful links

Facebook Ads documentation

ads_insights_country schema on GitHub

ads_insights_hourly_advertiser

The ads_insights_hourly_advertiser table contains entries for each campaign/set/ad combination for each day, along with detailed statistics, segmented by audience and advertiser time zones. This table contains the same fields as the ads_insights table, with the exception of hourly_stats_aggregated_by_advertiser_time_zone.

Note: Data for deleted ads, adsets, and campaigns will not appear in this table even if the Include data from deleted campaigns, ads, and adsets option in the integration’s settings is enabled.

Replication Method

Key-based Incremental

Primary Keys

hourly_stats_aggregated_by_advertiser_time_zone

ad_id

adset_id

campaign_id

date_start

Replication Key

date_start

Useful links

Facebook Ads documentation

ads_insights_hourly_advertiser schema on GitHub

ads_insights_platform_and_device

The ads_insights_platform_and_device table contains entries for each campaign/set/ad combination for each day, along with detailed statistics, segmented by publisher platform, platform position, and device.

This table contains the same fields as the ads_insights table, with the exception of the following fields:

  • publisher_platform
  • platform_position
  • impression_device

Note: Data for deleted ads, adsets, and campaigns will not appear in this table even if the Include data from deleted campaigns, ads, and adsets option in the integration’s settings is enabled.

Replication Method

Key-based Incremental

Primary Keys

ad_id

adset_id

campaign_id

date_start

publisher_platform

platform_position

impression_device

Replication Key

date_start

Useful links

Facebook Ads documentation

ads_insights_platform_and_device schema on GitHub

ads_insights_region

The ads_insights_region table contains entries for each campaign/set/ad combination for each day, along with detailed statistics, segmented by region. This table enables you to view your data by the region (ex: state or province) where people live or were located when they saw your ads, depending on how the location targeting was set.

This table contains the same fields as the ads_insights table, with the exception of region.

Note: Data for deleted ads, adsets, and campaigns will not appear in this table even if the Include data from deleted campaigns, ads, and adsets option in the integration’s settings is enabled.

Replication Method

Key-based Incremental

Primary Keys

ad_id

adset_id

campaign_id

date_start

region

Replication Key

date_start

Useful links

Facebook Ads documentation

ads_insights_region schema on GitHub

adsets

The adsets table contains info about the Ad Sets in your Facebook Ads account.

This is a Core Object table.

updated_time and querying

Because this table uses updated_time as part of the Primary Key, query results might return various versions of the same adgroup.

To reflect the latest state of the adgroup, use the latest updated_time timestamp.

Deleted adsets

If the Include data from deleted campaigns, ads, and adsets box in the integration’s settings is checked, this table will include data for deleted adsets.

Replication Method

Key-based Incremental

Primary Keys

id

updated_time

Replication Key

updated_time

Useful links

adsets schema on GitHub

Facebook Ads API method

campaigns

The campaigns table contains info about the campaigns in your Facebook Ads account. Facebook defines campaigns as “a grouping of ad sets organized by the same business objective.”

This is a Core Object table.

Deleted campaigns

If the Include data from deleted campaigns, ads, and adsets box in the integration’s settings is checked, this table will include data for deleted campaigns.

Replication Method

Key-based Incremental

Primary Key

id

Replication Key

updated_time

Useful links

Facebook Ads documentation

campaigns schema on GitHub

Facebook Ads API method

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!