GET_AD_INSIGHTS_FACEBOOK_ADS

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

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_AD_INSIGHTS_FACEBOOK_ADS(account_name
[ad_name]
[fields]
[breakdowns]
[date_range]
[aggregation_period]
)
account_name

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

[optional] ad_name

Name or ID of your ad. For example: "Mobile ad".

[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
Actions
Action Values
Ad ID
Ad Name
Adset Name
Adset ID
Adset Name
Age Targeting
Auction Bid
Auction Competitiveness
Buying Type
Campaign ID
Campaign Name
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 From
Date To
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 ad insights by time period. By default, it will group the ad 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
More details

Access this page to check how you can find the account name or account ID.

Examples

GET_AD_INSIGHTS_FACEBOOK_ADS("adidas", "Website", A1:A2, "device_patform", ">2021-07-01") returns insights about `clicks` and `country` about the ads containing `Website` in the name on the `adidas` ad account. The values will be sorted by device platform.