Insights Flat

This pipeline provides a single, consistent interface to retrieve statistics about Ads, Ad Sets, and Campaigns. You can read more about this end-point on the facebook marketing API documentation page here

Configuring the Credentials

Select the account credentials which has access to relevant Facebook Ads data from the dropdown menu & Click Next

Credentials not listed in dropdown ?

Click on + Add New for adding new credentials

Data Pipelines Details

Data Pipeline

Select Insights Flat from the dropdown

Account

Select one or more accounts from the drop-down

All accounts which your credentials have access to should be available here. If they are not, please check the credentials selected / configured by you. While you can add multiple accounts, the table size may become too large and so it is advisable to add one account per pipeline and use Union queries in the data warehouse to join the data for consumption
Dimensions and Metrics

Select the dimensions and metrics you would like to fetch from the Facebook Ads platform. You can click on View Schema anytime to see the schema of the table being created.

Each of the selected dimension / metric will create one or more columns in the database table in the destination warehouse. For a complete list of all the available dimensions and metrics along with their explanation refer this link.

Setting Parameters

Parameter Description Values

Insert Mode

Required

Specifies the manner in which data will get updated in the data warehouse : UPSERT will insert only new records or records with changes, APPEND will insert all fetched data at the end, REPLACE will drop the existing table and recreate a fresh one on each run.

{Upsert, Append, Replace}

Default Value: Upsert

Breakdowns

Optional

This option is used to group the insight results into various sets. For example choosing Gender breakdown will give one row for each gender. Read this for more details on breakdowns and their possible combinations. Recommended to use one breakdown per report (except age and gender) which may be used together.

action_device action_canvas_component_name action_carousel_card_id action_carousel_card_name action_destination action_reaction action_target_id action_type action_video_sound action_video_type ad_format_asset age body_asset call_to_action_asset country description_asset device_platform dma frequency_value gender hourly_stats_aggregated_by_advertiser_time_zone hourly_stats_aggregated_by_audience_time_zone image_asset impression_device link_url_asset place_page_id platform_position product_id publisher_platform region title_asset video_asset

Level

Required

This parameter represents the level of result. Use campaign to get data at campaign granularity.

{ad, adset, campaign, account}

No of Days

Required

Number of days for which you wish to get the data in each run.

Integer value (Recommended value 30)

Use Account Attribution Setting

Required

If set True, the result will be returned using the attribution setting defined for the ad account.Each ad set has its own attribution setting value. The attribution setting for a campaign or an account is calculated based on existing ad sets.

{True, False}

Default Value: False

Action Attribution Windows

Required

Determines what is the attribution window for the actions. For example, 28d_click means the API returns all actions that happened 28 days after someone clicked on the ad.

{1d_view, 7d_view, 28d_view, 1d_click, 7d_click, 28d_click}

Default Value: ["1d_view","28d_click"]

Use Unified Attribution Setting

Required

The attribution_setting field only returns values when use_unified_attribution_setting is set to true. In this case parameter use_account_attribution_setting will be ignored. Unified attribution setting is defined at the ad set level.

{True, False}

Default Value: True

Filtering

Click on + Add New for setting up a new filter

In order to get details for objects which are in other states like paused or deleted etc we need to specify filters. These are needed since by default the facebook will return data only for those ads/campaigns etc which are enabled.

Available filters are as under:-

Filter Description Values

Ad Effective Status

Optional

Select all the types of effective status types by which you wish to filter your ads data. Recommended to select all values.

active, adset_paused, archived, campaign_paused, deleted, disapproved, in_process, paused, pending_review, pending_billing_info, preapproved, with_issues

Campaign Effective Status

Optional

Select all the types of effective status types by which you wish to filter your campaigns data. Recommended to select all values.

active, archived, deleted, in_process, paused, with_issues

Campaign Bid Strategy

Optional

Select all the types of bidding strategy types by which you wish to filter your campaign data. Recommended to select all values.

LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP,COST_CAP

Adset Effective Status

Optional

Select all the types of effective status types by which you wish to filter your adset data. Recommended to select all values.

active, archived, campaign_paused, deleted, in_process, paused, with_issues

Adset Bid Strategy

Optional

Select all the types of bidding strategy types by which you wish to filter your adset data. Recommended to select all values.

LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP,COST_CAP

Adset Billing Event

Optional

Select all the types of billing event types by which you wish to filter your adset data. Recommended to select all values.

APP_INSTALLS, CLICKS, IMPRESSIONS, LINK_CLICKS, NONE, OFFER_CLAIMS, PAGE_LIKES, POST_ENGAGEMENT, THRUPLAY, PURCHASE, LISTING_INTERACTION

Adset Optimization Goal

Optional

Select all the types of optimization goal types by which you wish to filter your adset data. Recommended to select all values.

NONE, APP_INSTALLS, BRAND_AWARENESS, AD_RECALL_LIFT, CLICKS, ENGAGED_USER, EVENT_RESPONSE, IMPRESSIONS, LEAD_GENERATION, QUALITY_LEAD, LINK_CLICKS, OFFER_CLAIMS, OFFSITE_CONVERSIONS, PAGE_ENGAGEMENT, PAGE_LIKES, POST_ENGAGEMENT, QUALITY_CALL, REACH, SOCIAL_IMPRESSIONS, APP_DOWNLOADS, TWO_SECOND_CONTINUOS_VIDEO_VIEWS, LANDING_PAGE_VIEWS, VISIT_INSTAGRAM_PROFILE, VALUE, THRUPLAY, REPLIES, DERIVED_EVENTS

Ad Impressions

Optional

Set this filter to get only those ads where number of impressions are greater than the specified value. Recommended to use greater than 0 as the filter value.

Integer greater than or equal to 0

Ad Delivery Info

Optional

Select all the types by which you wish to filter your ad data. Recommended to select all values.

active, archived, completed, inactive, limited, not_delivering, not_published, pending_review, permanently_deleted, recently_completed, recently_rejected, rejected, scheduled

Ad Set Delivery Info

Optional

Select all the types by which you wish to filter your adset data. Recommended to select all values.

active, archived, completed, inactive, limited, not_delivering, not_published, pending_review, permanently_deleted, recently_completed, recently_rejected, rejected, scheduled

Campaign Delivery Info

Optional

Select all the types by which you wish to filter your campaign data. Recommended to select all values.

active, archived, completed, inactive, limited, not_delivering, not_published, pending_review, permanently_deleted, recently_completed, recently_rejected, rejected, scheduled

Datapipeline Scheduling

Scheduling specifies the frequency with which data will get updated in the data warehouse. You can choose between Manual Run, Normal Scheduling or Advance Scheduling.

Manual Run

If scheduling is not required, you can use the toggle to run the pipeline manually.

Normal Scheduling

Use the dropdown to select an interval-based hourly, monthly, weekly, or daily frequency.

Advance Scheduling

Set schedules fine-grained at the level of Months, Days, Hours, and Minutes.

Detailed explanation on scheduling of pipelines can be found here

Dataset & Name

Dataset Name

Key in the Dataset Name(also serves as the table name in your data warehouse).Keep in mind, that the name should be unique across the account and the data source. Special characters (except underscore _) and blank spaces are not allowed. It is best to follow a consistent naming scheme for future search to locate the tables.

Dataset Description

Enter a short description (optional) describing the dataset being fetched by this particular pipeline.

Notifications

Choose the events for which you’d like to be notified: whether "ERROR ONLY" or "ERROR AND SUCCESS".

Once you have finished click on Finish to save it. Read more about naming and saving your pipelines including the option to save them as templates here

Still have Questions?

We’ll be happy to help you with any questions you might have! Send us an email at info@datachannel.co.

Subscribe to our Newsletter for latest updates at DataChannel.