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

  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.

  • 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.

Replication Method

Full Table

Primary Key

id

Useful links

Facebook Ads documentation

adcreative schema on GitHub

Facebook Ads API method

Join adcreative with on
ads
adcreative.account_id = ads.account_id
adcreative.adlabels.id = ads.id
adcreative.id = ads.creative.creative_id
ads_insights
adcreative.account_id = ads_insights.account_id
ads_insights_age_and_gender
adcreative.account_id = ads_insights_age_and_gender.account_id
ads_insights_country
adcreative.account_id = ads_insights_country.account_id
ads_insights_dma
adcreative.account_id = ads_insights_dma.account_id
ads_insights_platform_and_device
adcreative.account_id = ads_insights_platform_and_device.account_id
ads_insights_region
adcreative.account_id = ads_insights_region.account_id
adsets
adcreative.adlabels.id = adsets.id
adcreative.object_story_spec.link_data.offer_id = adsets.promoted_object.offer_id
adcreative.object_story_spec.template_data.offer_id = adsets.promoted_object.offer_id
adcreative.object_story_spec.video_data.offer_id = adsets.promoted_object.offer_id
adcreative.object_story_spec.page_id = adsets.promoted_object.page_id
adcreative.product_set_id = adsets.promoted_object.product_set_id

account_id

STRING

actor_id

STRING

adlabels

ARRAY

created_time

DATE-TIME

id

STRING

name

STRING

updated_time

DATE-TIME

applink_treatment

STRING

body

STRING

call_to_action_type

STRING

effective_instagram_story_id

STRING

effective_object_story_id

STRING

id

STRING

image_crops

OBJECT

100x100

ARRAY

100x72

ARRAY

191x100

ARRAY

400x150

ARRAY

400x500

ARRAY

600x360

ARRAY

90x160

ARRAY

image_hash

STRING

image_url

STRING

instagram_actor_id

STRING

instagram_permalink_url

STRING

instagram_story_id

STRING

link_og_id

STRING

link_url

STRING

name

STRING

object_id

STRING

object_story_id

STRING

object_story_spec

OBJECT

instagram_actor_id

STRING

link_data

OBJECT

page_id

STRING

photo_data

OBJECT

branded_content_sponsor_page_id

STRING

branded_content_sponsor_relationship

STRING

caption

STRING

image_hash

STRING

page_welcome_message

STRING

url

STRING

template_data

OBJECT

additional_image_index

INTEGER

app_link_spec

OBJECT

attachment_style

STRING

branded_content_sponsor_page_id

STRING

branded_content_sponsor_relationship

STRING

call_to_action

OBJECT

type

STRING

value

OBJECT

app_destination

STRING

app_link

STRING

application

STRING

event_id

STRING

lead_gen_form_id

STRING

link

STRING

link_caption

STRING

link_format

STRING

page

STRING

product_link

STRING

caption

STRING

child_attachments

ARRAY

call_to_action

OBJECT

type

STRING

value

OBJECT

app_destination

STRING

app_link

STRING

application

STRING

event_id

STRING

lead_gen_form_id

STRING

link

STRING

link_caption

STRING

link_format

STRING

page

STRING

product_link

STRING

caption

STRING

description

STRING

image_crops

OBJECT

100x100

ARRAY

100x72

ARRAY

191x100

ARRAY

400x150

ARRAY

400x500

ARRAY

600x360

ARRAY

90x160

ARRAY

image_hash

STRING

link

STRING

name

STRING

picture

STRING

static_card

BOOLEAN

video_id

STRING

description

STRING

event_id

STRING

force_single_link

BOOLEAN

image_crops

OBJECT

100x100

ARRAY

100x72

ARRAY

191x100

ARRAY

400x150

ARRAY

400x500

ARRAY

600x360

ARRAY

90x160

ARRAY

image_hash

STRING

link

STRING

message

STRING

multi_share_end_card

BOOLEAN

multi_share_optimized

BOOLEAN

name

STRING

offer_id

STRING

page_welcome_message

STRING

picture

STRING

retailer_item_ids

ARRAY

show_multiple_images

BOOLEAN

text_data

OBJECT

message

STRING

video_data

OBJECT

additional_image_index

INTEGER

branded_content_sponsor_page_id

STRING

branded_content_sponsor_relationship

STRING

call_to_action

OBJECT

type

STRING

value

OBJECT

app_destination

STRING

app_link

STRING

application

STRING

event_id

STRING

lead_gen_form_id

STRING

link

STRING

link_caption

STRING

link_format

STRING

page

STRING

product_link

STRING

image_hash

STRING

image_url

STRING

link_description

STRING

message

STRING

offer_id

STRING

page_welcome_message

STRING

retailer_item_ids

ARRAY

targeting

OBJECT

age_max

INTEGER

age_min

INTEGER

app_install_state

STRING

audience_network_positions

ARRAY

behaviors

ARRAY

id

STRING

name

STRING

connections

ARRAY

id

STRING

name

STRING

custom_audiences

ARRAY

id

STRING

name

STRING

device_platforms

ARRAY

education_statuses

ARRAY

excluded_connections

ARRAY

id

STRING

name

STRING

excluded_custom_audiences

ARRAY

excluded_geo_locations

OBJECT

cities

ARRAY

country

STRING

distance_unit

STRING

key

STRING

name

STRING

radius

INTEGER

region

STRING

region_id

STRING

countries

ARRAY

country_groups

ARRAY

custom_locations

ARRAY

address_string

STRING

country

STRING

distance_unit

STRING

latitude

NUMBER

longitude

NUMBER

name

STRING

primary_city_id

INTEGER

radius

INTEGER

region_id

INTEGER

geo-markets

ARRAY

key

STRING

name

STRING

location_types

ARRAY

regions

ARRAY

country

STRING

key

STRING

name

STRING

zips

ARRAY

country

STRING

key

STRING

name

STRING

primary_city_id

INTEGER

region_id

INTEGER

excluded_publisher_categories

ARRAY

excluded_user_device

ARRAY

exclusions

OBJECT

behaviors

ARRAY

id

STRING

name

STRING

connections

ARRAY

id

STRING

name

STRING

custom_audiences

ARRAY

id

STRING

name

STRING

education_majors

ARRAY

id

STRING

name

STRING

excluded_connections

ARRAY

id

STRING

name

STRING

excluded_custom_audiences

ARRAY

family_statuses

ARRAY

id

STRING

name

STRING

friends_of_connections

ARRAY

generation

ARRAY

id

STRING

name

STRING

home_ownership

ARRAY

id

STRING

name

STRING

home_type

ARRAY

id

STRING

name

STRING

household_composition

ARRAY

income

ARRAY

id

STRING

name

STRING

industries

ARRAY

id

STRING

name

STRING

interests

ARRAY

id

STRING

name

STRING

life_events

ARRAY

id

STRING

name

STRING

moms

ARRAY

id

STRING

name

STRING

net_worth

ARRAY

id

STRING

name

STRING

politics

ARRAY

id

STRING

name

STRING

relationship_statuses

ARRAY

user_adclusters

ARRAY

id

STRING

name

STRING

work_employers

ARRAY

id

STRING

name

STRING

work_positions

ARRAY

id

STRING

name

STRING

facebook_positions

ARRAY

family_statuses

ARRAY

id

STRING

name

STRING

flexible_spec

ARRAY

behaviors

ARRAY

id

STRING

name

STRING

connections

ARRAY

id

STRING

name

STRING

custom_audiences

ARRAY

id

STRING

name

STRING

education_majors

ARRAY

id

STRING

name

STRING

excluded_connections

ARRAY

id

STRING

name

STRING

excluded_custom_audiences

ARRAY

family_statuses

ARRAY

id

STRING

name

STRING

friends_of_connections

ARRAY

generation

ARRAY

id

STRING

name

STRING

home_ownership

ARRAY

id

STRING

name

STRING

home_type

ARRAY

id

STRING

name

STRING

household_composition

ARRAY

income

ARRAY

id

STRING

name

STRING

industries

ARRAY

id

STRING

name

STRING

interests

ARRAY

id

STRING

name

STRING

life_events

ARRAY

id

STRING

name

STRING

moms

ARRAY

id

STRING

name

STRING

net_worth

ARRAY

id

STRING

name

STRING

politics

ARRAY

id

STRING

name

STRING

relationship_statuses

ARRAY

user_adclusters

ARRAY

id

STRING

name

STRING

work_employers

ARRAY

id

STRING

name

STRING

work_positions

ARRAY

id

STRING

name

STRING

friends_of_connections

ARRAY

genders

ARRAY

generation

ARRAY

id

STRING

name

STRING

geo_locations

OBJECT

cities

ARRAY

country

STRING

distance_unit

STRING

key

STRING

name

STRING

radius

INTEGER

region

STRING

region_id

STRING

countries

ARRAY

country_groups

ARRAY

custom_locations

ARRAY

address_string

STRING

country

STRING

distance_unit

STRING

latitude

NUMBER

longitude

NUMBER

name

STRING

primary_city_id

INTEGER

radius

INTEGER

region_id

INTEGER

geo-markets

ARRAY

key

STRING

name

STRING

location_types

ARRAY

regions

ARRAY

country

STRING

key

STRING

name

STRING

zips

ARRAY

country

STRING

key

STRING

name

STRING

primary_city_id

INTEGER

region_id

INTEGER

home_ownership

ARRAY

id

STRING

name

STRING

home_type

ARRAY

id

STRING

name

STRING

income

ARRAY

id

STRING

name

STRING

industries

ARRAY

id

STRING

name

STRING

instagram_positions

ARRAY

interested_in

ARRAY

interests

ARRAY

id

STRING

name

STRING

locales

ARRAY

messenger_positions

ARRAY

moms

ARRAY

id

STRING

name

STRING

net_worth

ARRAY

id

STRING

name

STRING

office_type

ARRAY

id

STRING

name

STRING

politics

ARRAY

id

STRING

name

STRING

publisher_platforms

ARRAY

relationship_statuses

ARRAY

targeting_optimization

STRING

user_adclusters

ARRAY

id

STRING

name

STRING

user_device

ARRAY

user_os

ARRAY

work_positions

ARRAY

id

STRING

name

STRING

title

STRING

video_id

STRING

object_type

STRING

object_url

STRING

product_set_id

STRING

status

STRING

template_url

STRING

template_url_spec

OBJECT

android

OBJECT

app_name

STRING

package

STRING

url

STRING

config

OBJECT

app_id

STRING

ios

OBJECT

app_name

STRING

app_store_id

STRING

url

STRING

ipad

OBJECT

app_name

STRING

app_store_id

STRING

url

STRING

iphone

OBJECT

app_name

STRING

app_store_id

STRING

url

STRING

web

OBJECT

should_fallback

STRING

url

STRING

windows_phone

OBJECT

app_id

STRING

app_name

STRING

url

STRING

thumbnail_url

STRING

title

STRING

url_tags

STRING

video_id

STRING

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

Join ads with on
adcreative
ads.account_id = adcreative.account_id
ads.id = adcreative.adlabels.id
ads.creative.creative_id = adcreative.id
ads_insights
ads.account_id = ads_insights.account_id
ads.adset_id = ads_insights.adset_id
ads.id = ads_insights.ad_id
ads.campaign_id = ads_insights.campaign_id
ads_insights_age_and_gender
ads.account_id = ads_insights_age_and_gender.account_id
ads.adset_id = ads_insights_age_and_gender.adset_id
ads.id = ads_insights_age_and_gender.ad_id
ads.campaign_id = ads_insights_age_and_gender.campaign_id
ads_insights_country
ads.account_id = ads_insights_country.account_id
ads.adset_id = ads_insights_country.adset_id
ads.id = ads_insights_country.ad_id
ads.campaign_id = ads_insights_country.campaign_id
ads_insights_dma
ads.account_id = ads_insights_dma.account_id
ads.adset_id = ads_insights_dma.adset_id
ads.id = ads_insights_dma.ad_id
ads.campaign_id = ads_insights_dma.campaign_id
ads_insights_platform_and_device
ads.account_id = ads_insights_platform_and_device.account_id
ads.adset_id = ads_insights_platform_and_device.adset_id
ads.id = ads_insights_platform_and_device.ad_id
ads.campaign_id = ads_insights_platform_and_device.campaign_id
ads_insights_region
ads.account_id = ads_insights_region.account_id
ads.adset_id = ads_insights_region.adset_id
ads.id = ads_insights_region.ad_id
ads.campaign_id = ads_insights_region.campaign_id
adsets
ads.id = adsets.id
ads.adset_id = adsets.id
campaigns
ads.id = campaigns.ads.data.id
ads.campaign_id = campaigns.id

account_id

STRING

adlabels

ARRAY

created_time

DATE-TIME

id

STRING

name

STRING

updated_time

DATE-TIME

adset_id

STRING

bid_amount

INTEGER

bid_info

OBJECT

ACTIONS

INTEGER

CLICKS

INTEGER

IMPRESSIONS

INTEGER

REACH

INTEGER

SOCIAL

INTEGER

bid_type

STRING

campaign_id

STRING

conversion_specs

ARRAY

action.type

ARRAY

application

ARRAY

conversion_id

ARRAY

creative

ARRAY

dataset

ARRAY

event

ARRAY

event.creator

ARRAY

event_type

ARRAY

fb_pixel

ARRAY

fb_pixel_event

ARRAY

leadgen

ARRAY

object

ARRAY

object.domain

ARRAY

offer

ARRAY

offer.creator

ARRAY

offsite_pixel

ARRAY

page

ARRAY

page.parent

ARRAY

post

ARRAY

post.object

ARRAY

post.object.wall

ARRAY

post.wall

ARRAY

question

ARRAY

question.creator

ARRAY

response

ARRAY

subtype

ARRAY

created_time

DATE-TIME

creative

OBJECT

creative_id

STRING

id

STRING

effective_status

STRING

id

STRING

last_updated_by_app_id

STRING

name

STRING

recommendations

ARRAY

blame_field

STRING

code

INTEGER

confidence

STRING

importance

STRING

message

STRING

title

STRING

source_ad_id

STRING

status

STRING

targeting

OBJECT

age_max

INTEGER

age_min

INTEGER

app_install_state

STRING

audience_network_positions

ARRAY

behaviors

ARRAY

id

STRING

name

STRING

connections

ARRAY

id

STRING

name

STRING

custom_audiences

ARRAY

id

STRING

name

STRING

device_platforms

ARRAY

education_statuses

ARRAY

excluded_connections

ARRAY

id

STRING

name

STRING

excluded_custom_audiences

ARRAY

excluded_geo_locations

OBJECT

cities

ARRAY

country

STRING

distance_unit

STRING

key

STRING

name

STRING

radius

INTEGER

region

STRING

region_id

STRING

countries

ARRAY

country_groups

ARRAY

custom_locations

ARRAY

address_string

STRING

country

STRING

distance_unit

STRING

latitude

NUMBER

longitude

NUMBER

name

STRING

primary_city_id

INTEGER

radius

INTEGER

region_id

INTEGER

geo-markets

ARRAY

key

STRING

name

STRING

location_types

ARRAY

regions

ARRAY

country

STRING

key

STRING

name

STRING

zips

ARRAY

country

STRING

key

STRING

name

STRING

primary_city_id

INTEGER

region_id

INTEGER

excluded_publisher_categories

ARRAY

excluded_user_device

ARRAY

exclusions

OBJECT

behaviors

ARRAY

id

STRING

name

STRING

connections

ARRAY

id

STRING

name

STRING

custom_audiences

ARRAY

id

STRING

name

STRING

education_majors

ARRAY

id

STRING

name

STRING

excluded_connections

ARRAY

id

STRING

name

STRING

excluded_custom_audiences

ARRAY

family_statuses

ARRAY

id

STRING

name

STRING

friends_of_connections

ARRAY

generation

ARRAY

id

STRING

name

STRING

home_ownership

ARRAY

id

STRING

name

STRING

home_type

ARRAY

id

STRING

name

STRING

household_composition

ARRAY

income

ARRAY

id

STRING

name

STRING

industries

ARRAY

id

STRING

name

STRING

interests

ARRAY

id

STRING

name

STRING

life_events

ARRAY

id

STRING

name

STRING

moms

ARRAY

id

STRING

name

STRING

net_worth

ARRAY

id

STRING

name

STRING

politics

ARRAY

id

STRING

name

STRING

relationship_statuses

ARRAY

user_adclusters

ARRAY

id

STRING

name

STRING

work_employers

ARRAY

id

STRING

name

STRING

work_positions

ARRAY

id

STRING

name

STRING

facebook_positions

ARRAY

family_statuses

ARRAY

id

STRING

name

STRING

flexible_spec

ARRAY

behaviors

ARRAY

id

STRING

name

STRING

connections

ARRAY

id

STRING

name

STRING

custom_audiences

ARRAY

id

STRING

name

STRING

education_majors

ARRAY

id

STRING

name

STRING

excluded_connections

ARRAY

id

STRING

name

STRING

excluded_custom_audiences

ARRAY

family_statuses

ARRAY

id

STRING

name

STRING

friends_of_connections

ARRAY

generation

ARRAY

id

STRING

name

STRING

home_ownership

ARRAY

id

STRING

name

STRING

home_type

ARRAY

id

STRING

name

STRING

household_composition

ARRAY

income

ARRAY

id

STRING

name

STRING

industries

ARRAY

id

STRING

name

STRING

interests

ARRAY

id

STRING

name

STRING

life_events

ARRAY

id

STRING

name

STRING

moms

ARRAY

id

STRING

name

STRING

net_worth

ARRAY

id

STRING

name

STRING

politics

ARRAY

id

STRING

name

STRING

relationship_statuses

ARRAY

user_adclusters

ARRAY

id

STRING

name

STRING

work_employers

ARRAY

id

STRING

name

STRING

work_positions

ARRAY

id

STRING

name

STRING

friends_of_connections

ARRAY

genders

ARRAY

generation

ARRAY

id

STRING

name

STRING

geo_locations

OBJECT

cities

ARRAY

country

STRING

distance_unit

STRING

key

STRING

name

STRING

radius

INTEGER

region

STRING

region_id

STRING

countries

ARRAY

country_groups

ARRAY

custom_locations

ARRAY

address_string

STRING

country

STRING

distance_unit

STRING

latitude

NUMBER

longitude

NUMBER

name

STRING

primary_city_id

INTEGER

radius

INTEGER

region_id

INTEGER

geo-markets

ARRAY

key

STRING

name

STRING

location_types

ARRAY

regions

ARRAY

country

STRING

key

STRING

name

STRING

zips

ARRAY

country

STRING

key

STRING

name

STRING

primary_city_id

INTEGER

region_id

INTEGER

home_ownership

ARRAY

id

STRING

name

STRING

home_type

ARRAY

id

STRING

name

STRING

income

ARRAY

id

STRING

name

STRING

industries

ARRAY

id

STRING

name

STRING

instagram_positions

ARRAY

interested_in

ARRAY

interests

ARRAY

id

STRING

name

STRING

locales

ARRAY

messenger_positions

ARRAY

moms

ARRAY

id

STRING

name

STRING

net_worth

ARRAY

id

STRING

name

STRING

office_type

ARRAY

id

STRING

name

STRING

politics

ARRAY

id

STRING

name

STRING

publisher_platforms

ARRAY

relationship_statuses

ARRAY

targeting_optimization

STRING

user_adclusters

ARRAY

id

STRING

name

STRING

user_device

ARRAY

user_os

ARRAY

work_positions

ARRAY

id

STRING

name

STRING

tracking_specs

ARRAY

action.type

ARRAY

application

ARRAY

conversion_id

ARRAY

creative

ARRAY

dataset

ARRAY

event

ARRAY

event.creator

ARRAY

event_type

ARRAY

fb_pixel

ARRAY

fb_pixel_event

ARRAY

leadgen

ARRAY

object

ARRAY

object.domain

ARRAY

offer

ARRAY

offer.creator

ARRAY

offsite_pixel

ARRAY

page

ARRAY

page.parent

ARRAY

post

ARRAY

post.object

ARRAY

post.object.wall

ARRAY

post.wall

ARRAY

question

ARRAY

question.creator

ARRAY

response

ARRAY

subtype

ARRAY

updated_time

DATE-TIME

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

Join ads_insights with on
adcreative
ads_insights.account_id = adcreative.account_id
ads
ads_insights.account_id = ads.account_id
ads_insights.adset_id = ads.adset_id
ads_insights.ad_id = ads.id
ads_insights.campaign_id = ads.campaign_id
ads_insights_age_and_gender
ads_insights.account_id = ads_insights_age_and_gender.account_id
ads_insights.adset_id = ads_insights_age_and_gender.adset_id
ads_insights.ad_id = ads_insights_age_and_gender.ad_id
ads_insights.campaign_id = ads_insights_age_and_gender.campaign_id
ads_insights_country
ads_insights.account_id = ads_insights_country.account_id
ads_insights.adset_id = ads_insights_country.adset_id
ads_insights.ad_id = ads_insights_country.ad_id
ads_insights.campaign_id = ads_insights_country.campaign_id
ads_insights_dma
ads_insights.account_id = ads_insights_dma.account_id
ads_insights.adset_id = ads_insights_dma.adset_id
ads_insights.ad_id = ads_insights_dma.ad_id
ads_insights.campaign_id = ads_insights_dma.campaign_id
ads_insights_platform_and_device
ads_insights.account_id = ads_insights_platform_and_device.account_id
ads_insights.adset_id = ads_insights_platform_and_device.adset_id
ads_insights.ad_id = ads_insights_platform_and_device.ad_id
ads_insights.campaign_id = ads_insights_platform_and_device.campaign_id
ads_insights_region
ads_insights.account_id = ads_insights_region.account_id
ads_insights.adset_id = ads_insights_region.adset_id
ads_insights.ad_id = ads_insights_region.ad_id
ads_insights.campaign_id = ads_insights_region.campaign_id
adsets
ads_insights.adset_id = adsets.id
campaigns
ads_insights.ad_id = campaigns.ads.data.id
ads_insights.campaign_id = campaigns.id

account_id

STRING

account_name

STRING

action_values

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

ad_id

STRING

ad_name

STRING

adset_id

STRING

adset_name

STRING

campaign_id

STRING

campaign_name

STRING

canvas_avg_view_percent

NUMBER

canvas_avg_view_time

NUMBER

clicks

INTEGER

conversion_rate_ranking

STRING

conversion_values

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

conversions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

cost_per_action_type

ARRAY

action_type

STRING

value

STRING

cost_per_inline_link_click

NUMBER

cost_per_inline_post_engagement

NUMBER

cost_per_unique_action_type

ARRAY

action_type

STRING

value

STRING

cost_per_unique_click

NUMBER

cost_per_unique_inline_link_click

NUMBER

cpc

NUMBER

cpm

NUMBER

cpp

NUMBER

ctr

NUMBER

date_start

DATE-TIME

date_stop

DATE-TIME

engagement_rate_ranking

STRING

frequency

NUMBER

impressions

INTEGER

inline_link_click_ctr

NUMBER

inline_link_clicks

INTEGER

inline_post_engagement

INTEGER

objective

STRING

outbound_clicks

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

quality_ranking

STRING

reach

INTEGER

social_spend

NUMBER

spend

NUMBER

unique_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

unique_clicks

INTEGER

unique_ctr

NUMBER

unique_inline_link_click_ctr

NUMBER

unique_inline_link_clicks

INTEGER

unique_link_clicks_ctr

NUMBER

unique_outbound_clicks

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_30_sec_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p100_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p25_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p50_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p75_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_play_curve_actions

ARRAY

action_type

STRING

value

ARRAY

website_ctr

ARRAY

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

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

Join ads_insights_age_and_gender with on
adcreative
ads_insights_age_and_gender.account_id = adcreative.account_id
ads
ads_insights_age_and_gender.account_id = ads.account_id
ads_insights_age_and_gender.adset_id = ads.adset_id
ads_insights_age_and_gender.ad_id = ads.id
ads_insights_age_and_gender.campaign_id = ads.campaign_id
ads_insights
ads_insights_age_and_gender.account_id = ads_insights.account_id
ads_insights_age_and_gender.adset_id = ads_insights.adset_id
ads_insights_age_and_gender.ad_id = ads_insights.ad_id
ads_insights_age_and_gender.campaign_id = ads_insights.campaign_id
ads_insights_country
ads_insights_age_and_gender.account_id = ads_insights_country.account_id
ads_insights_age_and_gender.adset_id = ads_insights_country.adset_id
ads_insights_age_and_gender.ad_id = ads_insights_country.ad_id
ads_insights_age_and_gender.campaign_id = ads_insights_country.campaign_id
ads_insights_dma
ads_insights_age_and_gender.account_id = ads_insights_dma.account_id
ads_insights_age_and_gender.adset_id = ads_insights_dma.adset_id
ads_insights_age_and_gender.ad_id = ads_insights_dma.ad_id
ads_insights_age_and_gender.campaign_id = ads_insights_dma.campaign_id
ads_insights_platform_and_device
ads_insights_age_and_gender.account_id = ads_insights_platform_and_device.account_id
ads_insights_age_and_gender.adset_id = ads_insights_platform_and_device.adset_id
ads_insights_age_and_gender.ad_id = ads_insights_platform_and_device.ad_id
ads_insights_age_and_gender.campaign_id = ads_insights_platform_and_device.campaign_id
ads_insights_region
ads_insights_age_and_gender.account_id = ads_insights_region.account_id
ads_insights_age_and_gender.adset_id = ads_insights_region.adset_id
ads_insights_age_and_gender.ad_id = ads_insights_region.ad_id
ads_insights_age_and_gender.campaign_id = ads_insights_region.campaign_id
adsets
ads_insights_age_and_gender.adset_id = adsets.id
campaigns
ads_insights_age_and_gender.ad_id = campaigns.ads.data.id
ads_insights_age_and_gender.campaign_id = campaigns.id

account_id

STRING

account_name

STRING

action_values

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

ad_id

STRING

ad_name

STRING

adset_id

STRING

adset_name

STRING

age

INTEGER, STRING

campaign_id

STRING

campaign_name

STRING

canvas_avg_view_percent

NUMBER

canvas_avg_view_time

NUMBER

clicks

INTEGER

conversion_rate_ranking

STRING

conversion_values

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

conversions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

cost_per_action_type

ARRAY

action_type

STRING

value

STRING

cost_per_inline_link_click

NUMBER

cost_per_inline_post_engagement

NUMBER

cost_per_unique_action_type

ARRAY

action_type

STRING

value

STRING

cost_per_unique_click

NUMBER

cost_per_unique_inline_link_click

NUMBER

cpc

NUMBER

cpm

NUMBER

cpp

NUMBER

ctr

NUMBER

date_start

DATE-TIME

date_stop

DATE-TIME

engagement_rate_ranking

STRING

frequency

NUMBER

gender

STRING

impressions

INTEGER

inline_link_click_ctr

NUMBER

inline_link_clicks

INTEGER

inline_post_engagement

INTEGER

objective

STRING

outbound_clicks

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

quality_ranking

STRING

reach

INTEGER

social_spend

NUMBER

spend

NUMBER

unique_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

unique_clicks

INTEGER

unique_ctr

NUMBER

unique_inline_link_click_ctr

NUMBER

unique_inline_link_clicks

INTEGER

unique_link_clicks_ctr

NUMBER

unique_outbound_clicks

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_30_sec_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p100_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p25_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p50_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p75_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_play_curve_actions

ARRAY

action_type

STRING

value

ARRAY

website_ctr

ARRAY

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

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

Join ads_insights_country with on
adcreative
ads_insights_country.account_id = adcreative.account_id
ads
ads_insights_country.account_id = ads.account_id
ads_insights_country.adset_id = ads.adset_id
ads_insights_country.ad_id = ads.id
ads_insights_country.campaign_id = ads.campaign_id
ads_insights
ads_insights_country.account_id = ads_insights.account_id
ads_insights_country.adset_id = ads_insights.adset_id
ads_insights_country.ad_id = ads_insights.ad_id
ads_insights_country.campaign_id = ads_insights.campaign_id
ads_insights_age_and_gender
ads_insights_country.account_id = ads_insights_age_and_gender.account_id
ads_insights_country.adset_id = ads_insights_age_and_gender.adset_id
ads_insights_country.ad_id = ads_insights_age_and_gender.ad_id
ads_insights_country.campaign_id = ads_insights_age_and_gender.campaign_id
ads_insights_dma
ads_insights_country.account_id = ads_insights_dma.account_id
ads_insights_country.adset_id = ads_insights_dma.adset_id
ads_insights_country.ad_id = ads_insights_dma.ad_id
ads_insights_country.campaign_id = ads_insights_dma.campaign_id
ads_insights_platform_and_device
ads_insights_country.account_id = ads_insights_platform_and_device.account_id
ads_insights_country.adset_id = ads_insights_platform_and_device.adset_id
ads_insights_country.ad_id = ads_insights_platform_and_device.ad_id
ads_insights_country.campaign_id = ads_insights_platform_and_device.campaign_id
ads_insights_region
ads_insights_country.account_id = ads_insights_region.account_id
ads_insights_country.adset_id = ads_insights_region.adset_id
ads_insights_country.ad_id = ads_insights_region.ad_id
ads_insights_country.campaign_id = ads_insights_region.campaign_id
adsets
ads_insights_country.adset_id = adsets.id
campaigns
ads_insights_country.ad_id = campaigns.ads.data.id
ads_insights_country.campaign_id = campaigns.id

account_id

STRING

account_name

STRING

action_values

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

ad_id

STRING

ad_name

STRING

adset_id

STRING

adset_name

STRING

campaign_id

STRING

campaign_name

STRING

canvas_avg_view_percent

NUMBER

canvas_avg_view_time

NUMBER

clicks

INTEGER

conversion_rate_ranking

STRING

conversion_values

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

conversions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

cost_per_action_type

ARRAY

action_type

STRING

value

STRING

cost_per_inline_link_click

NUMBER

cost_per_inline_post_engagement

NUMBER

cost_per_unique_action_type

ARRAY

action_type

STRING

value

STRING

cost_per_unique_click

NUMBER

cost_per_unique_inline_link_click

NUMBER

country

STRING

cpc

NUMBER

cpm

NUMBER

cpp

NUMBER

ctr

NUMBER

date_start

DATE-TIME

date_stop

DATE-TIME

engagement_rate_ranking

STRING

frequency

NUMBER

impressions

INTEGER

inline_link_click_ctr

NUMBER

inline_link_clicks

INTEGER

inline_post_engagement

INTEGER

objective

STRING

outbound_clicks

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

quality_ranking

STRING

reach

INTEGER

social_spend

NUMBER

spend

NUMBER

unique_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

unique_clicks

INTEGER

unique_ctr

NUMBER

unique_inline_link_click_ctr

NUMBER

unique_inline_link_clicks

INTEGER

unique_link_clicks_ctr

NUMBER

unique_outbound_clicks

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_30_sec_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p100_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p25_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p50_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p75_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_play_curve_actions

ARRAY

action_type

STRING

value

ARRAY

website_ctr

ARRAY

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

ads_insights_dma

The ads_insights_dma table contains entries for each campaign/set/ad combination for each day, along with detailed statistics, segmented by DMA (Designated Market Area).

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

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

dma

date_start

Replication Key

date_start

Useful links

Facebook Ads documentation

ads_insights_dma schema on GitHub

Join ads_insights_dma with on
adcreative
ads_insights_dma.account_id = adcreative.account_id
ads
ads_insights_dma.account_id = ads.account_id
ads_insights_dma.adset_id = ads.adset_id
ads_insights_dma.ad_id = ads.id
ads_insights_dma.campaign_id = ads.campaign_id
ads_insights
ads_insights_dma.account_id = ads_insights.account_id
ads_insights_dma.adset_id = ads_insights.adset_id
ads_insights_dma.ad_id = ads_insights.ad_id
ads_insights_dma.campaign_id = ads_insights.campaign_id
ads_insights_age_and_gender
ads_insights_dma.account_id = ads_insights_age_and_gender.account_id
ads_insights_dma.adset_id = ads_insights_age_and_gender.adset_id
ads_insights_dma.ad_id = ads_insights_age_and_gender.ad_id
ads_insights_dma.campaign_id = ads_insights_age_and_gender.campaign_id
ads_insights_country
ads_insights_dma.account_id = ads_insights_country.account_id
ads_insights_dma.adset_id = ads_insights_country.adset_id
ads_insights_dma.ad_id = ads_insights_country.ad_id
ads_insights_dma.campaign_id = ads_insights_country.campaign_id
ads_insights_platform_and_device
ads_insights_dma.account_id = ads_insights_platform_and_device.account_id
ads_insights_dma.adset_id = ads_insights_platform_and_device.adset_id
ads_insights_dma.ad_id = ads_insights_platform_and_device.ad_id
ads_insights_dma.campaign_id = ads_insights_platform_and_device.campaign_id
ads_insights_region
ads_insights_dma.account_id = ads_insights_region.account_id
ads_insights_dma.adset_id = ads_insights_region.adset_id
ads_insights_dma.ad_id = ads_insights_region.ad_id
ads_insights_dma.campaign_id = ads_insights_region.campaign_id
adsets
ads_insights_dma.adset_id = adsets.id
campaigns
ads_insights_dma.ad_id = campaigns.ads.data.id
ads_insights_dma.campaign_id = campaigns.id

account_id

STRING

account_name

STRING

action_values

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

ad_id

STRING

ad_name

STRING

adset_id

STRING

adset_name

STRING

campaign_id

STRING

campaign_name

STRING

canvas_avg_view_percent

NUMBER

canvas_avg_view_time

NUMBER

clicks

INTEGER

conversion_rate_ranking

STRING

conversion_values

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

conversions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

cost_per_action_type

ARRAY

action_type

STRING

value

STRING

cost_per_inline_link_click

NUMBER

cost_per_inline_post_engagement

NUMBER

cost_per_unique_action_type

ARRAY

action_type

STRING

value

STRING

cost_per_unique_click

NUMBER

cost_per_unique_inline_link_click

NUMBER

cpc

NUMBER

cpm

NUMBER

cpp

NUMBER

ctr

NUMBER

date_start

DATE-TIME

date_stop

DATE-TIME

dma

STRING

engagement_rate_ranking

STRING

frequency

NUMBER

impressions

INTEGER

inline_link_click_ctr

NUMBER

inline_link_clicks

INTEGER

inline_post_engagement

INTEGER

objective

STRING

outbound_clicks

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

quality_ranking

STRING

reach

INTEGER

social_spend

NUMBER

spend

NUMBER

unique_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

unique_clicks

INTEGER

unique_ctr

NUMBER

unique_inline_link_click_ctr

NUMBER

unique_inline_link_clicks

INTEGER

unique_link_clicks_ctr

NUMBER

unique_outbound_clicks

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_30_sec_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p100_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p25_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p50_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_p75_watched_actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

video_play_curve_actions

ARRAY

action_type

STRING

value

ARRAY

website_ctr

ARRAY

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

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

account_currency

STRING

account_id

STRING

account_name

STRING

action_values

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

actions

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

ad_id

STRING

ad_name

STRING

adset_id

STRING

adset_name

STRING

attribution_setting

STRING

buying_type

STRING

campaign_id

STRING

campaign_name

STRING

canvas_avg_view_percent

STRING

canvas_avg_view_time

STRING

catalog_segment_value

ARRAY

1d_click

NUMBER

1d_view

NUMBER

28d_click

NUMBER

28d_view

NUMBER

7d_click

NUMBER

7d_view

NUMBER

action_destination

STRING

action_target_id

STRING

action_type

STRING

value

NUMBER

clicks

STRING

conversion_rate_ranking

STRING

conversion_values

ARRAY