GET_ADSET_INSIGHTS_FACEBOOK_ADS

Get metrics such as clicks, CPC, CTR, and CPM about your Ad Sets by date.

People
Social
icon of Facebook AdsFacebook Ads
Not a big fan of functions?
Use the Actions Wizard to configure any action in Rows without functions.

Parameter List

Syntax
GET_ADSET_INSIGHTS_FACEBOOK_ADS(account_name
[adset_name]
[fields]
[breakdowns]
[date_range]
[aggregation_period]
)
account_name

Name or ID of your Facebook Ads account. For example: "Personal Ads account".

[optional] adset_name

Name or ID of your ad set. For example: "Performance in Germany".

[optional] fields

Range of fields to retrieve about the ad account. For example: '["clicks","country"]'. By default, it returns the most common metrics about the ad account. For a complete list of possible fields, see the Facebook Marketing API documentation.

Selected options:
Account Currency
Account Name
Account ID
Actions
Action Values
Adset ID
Adset Name
Age Targeting
Auction Bid
Auction Competitiveness
Buying Type
Canvas Average View Percent
Canvas Average View Time
Conversions
Conversions Values
Cost Per Inline Link Click
Cost Per Inline Post Engagement
Cost Per Unique Inline Link Click
Country
CPC
CTR
CPM
CPP
Created Time
Clicks
Date Start
Date Stop
Device Platform
DMA
Frequency
Frequency Value
Full View Impressions
Full View Reach
Gender Targeting
Hourly Stats Aggregated By Advertiser Time Zone
Hourly Stats Aggregated By Audience Time Zone
Impressions
Inline Link Click CTR
Inline Link Clicks
Inline Post Engagement
Location
Mobile Purchase ROAS
Objective
Optimization Goal
Place Page ID
Place Page Name
Product ID
Publisher Platform
Purchase ROAS
Reach
Social Spend
Spend
Updated Time
Website Purchase ROAS
Wish Bid
[optional] breakdowns

Range of values to break down the results into different sets. For example: '["device_platform"]'. For a complete list of possible breakdowns, see the Facebook Insights API Breakdowns documentation.

Selected options:
Ad Format Asset
Age
App ID
Body Asset
Call_to_action Asset
Country
Description Asset
Gender
Image Asset
Impression Device
Link_url Asset
Product ID
Region
Skan Conversion ID
Title Asset
Video Asset
DMA
Frequency Value
Hourly Stats Aggregated by advertiser time zone
Hourly Stats Aggregated by audience time zone
Place Page ID
Publisher Platform
Platform Position
Device Platform
[optional] date_range

Date range to get insights for. For example: ">2019", ">2019-11-01" or "[2010-01-01;2019-01-01]". By default, you get insights for the current month.

[optional] aggregation_period

Groups the ad set insights by time period. By default, it will group the ad set stats for the whole period. 1 breaks down that data by day,7 by week and monthly by calendar month.

Selected options:
daily
weekly
monthly

Examples

GET_ADSET_INSIGHTS_FACEBOOK_ADS("adidas", "web traffic", B1:B2, A1:A2, ">2021-07-01") returns insights about `spend`, `clicks`, and `reach` about the ad sets containing `web traffic` in its name from the `adidas` ad account. The values will be sorted by country and region.