GET_AD_METRICS_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_METRICS_FACEBOOK_ADS(account_name
[ad_name]
[metrics]
[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". Don't configure this field if you wish to retrieve metrics from all Ads of your account.

[optional] metrics

Range of metrics 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:
20s Calls Placed
3-Second Video Views
60s Calls Placed
Account Currency
Account Name
Achievements Unlocked (Omnichannel)
All Conversions
Adds Payment Info (Offsite Conversion)
Adds To Cart (Offsite Conversion)
Adds to Cart (Omnichannel)
Adds To Wishlist (Offsite Conversion)
Ad ID
Ad Name
Adset ID
Adset Name
Adset Name
Age Targeting
All offsite leads plus all On-Facebook leads
All On-Facebook Leads
App Activations (Omnichannel)
App Installs
App Installs (Omnichannel)
Applications Submitted
Appointments Scheduled
App Uses
Auction Bid
Auction Competitiveness
Blocked Messaging Conversations (Onsite Conversion)
Buying Type
Calls Placed
Campaign ID
Campaign Name
Canceled Subscriptions
Canvas Average View Percent
Canvas Average View Time
Check-ins
Checkouts Initiated (Omnichannel)
Clicks
Completed Registration (Offsite Conversion)
Contacts
Content Views (Omnichannel)
Cost - 20s Calls Placed
Cost - 3-Second Video Views
Cost - 60s Calls Placed
Cost - Achievements Unlocked (Omnichannel)
Cost - Adds Payment Info (Offsite Conversion)
Cost - Adds To Cart (Offsite Conversion)
Cost - Adds to Cart (Omnichannel)
Cost - Adds To Wishlist (Offsite Conversion)
Cost - All offsite leads plus all On-Facebook leads
Cost - All On-Facebook Leads
Cost - App Activations (Omnichannel)
Cost - App Installs
Cost - App Installs (Omnichannel)
Cost - Applications Submitted
Cost - Appointments Scheduled
Cost - App Uses
Cost - Blocked Messaging Conversations (Onsite Conversion)
Cost - Calls Placed
Cost - Canceled Subscriptions
Cost - Check-ins
Cost - Checkouts Initiated (Omnichannel)
Cost - Completed Registration (Offsite Conversion)
Cost - Contacts
Cost - Content Views (Omnichannel)
Cost - Credit Spends
Cost - Credit Spends (Omnichannel)
Cost - Custom Events (Omnichannel)
Cost - Custom pixel events defined by the advertiser (Offsite Conversion)
Cost - Donations
Cost - Estimated Call Confirmation Clicks
Cost - Event Responses
Cost - Game Plays
Cost - In-App Ad Clicks
Cost - In-App Ad Impressions
Cost - Initiates Checkout (Offsite Conversion)
Cost - Landing Page Views
Cost - Leads (Offsite Conversion)
Cost - Leads from Messenger and Instant Forms
Cost - Levels Achieved (Omnichannel)
Cost - Link Clicks
Cost - Location Searches
Cost - Messaging Conversations Started (Onsite Conversion)
Cost - Messaging Subscriptions (Onsite Conversion)
Cost - Mobile App Achievements
Cost - Mobile App Adds To Cart
Cost - Mobile App Adds to Wishlist
Cost - Mobile App Applications Submitted
Cost - Mobile App Appointments Scheduled
Cost - Mobile App Canceled Subscriptions
Cost - Mobile App Checkouts
Cost - Mobile App Contacts
Cost - Mobile App Content Views
Cost - Mobile App Credit Spends
Cost - Mobile App Donations
Cost - Mobile App Feature Unlocks
Cost - Mobile App Installs
Cost - Mobile App Location Searches
Cost - Mobile App Payment Details
Cost - Mobile App Products Customized
Cost - Mobile App Purchases
Cost - Mobile App Ratings
Cost - Mobile App Recurring Subscription Payments
Cost - Mobile App Registrations
Cost - Mobile App Searchs
Cost - Mobile App Starts
Cost - Mobile App Subscriptions
Cost - Mobile App Trials Started
Cost - Mobile App Tutorial Completions
Cost - New Messaging Conversations (Onsite Conversion)
Cost - Offline App Appointments Scheduled
Cost - Offline Applications Submitted
Cost - Offline App Location Searches
Cost - Offline Canceled Subscriptions
Cost - Offline Contacts
Cost - Offline Donations
Cost - Offline Products Customized
Cost - Offline Recurring Subscription Payments
Cost - Offline Subscriptions
Cost - Offline Trials Started
Cost - On Facebook Applications Submitted
Cost - On Facebook Donations
Cost - On-Facebook Purchases (Onsite Conversion)
Cost - On-Facebook Workflow Completions (Offsite Conversion)
Cost - Other Mobile App Actions
Cost - Outbound Clicks
Cost - Page Engagement
Cost - Page Likes
Cost - Page Photo Views
Cost Per Inline Link Click
Cost Per Inline Post Engagement
Cost Per Unique Inline Link Click
Cost - Post Comments
Cost - Post Engagement
Cost - Post Reactions
Cost - Post Saves (Onsite Conversion)
Cost - Post Shares
Cost - Products Customized
Cost - Purchases (Offsite Conversion)
Cost - Purchases (Omnichannel)
Cost - Ratings Submitted (Omnichannel)
Cost - Recurring Subscription Payments
Cost - Registrations Completed (Omnichannel)
Cost - Searches (Omnichannel)
Cost - Searchs (Offsite Conversion)
Cost - Subscriptions
Cost - Trials Started
Cost - Tutorials Completed (Omnichannel)
Cost - Views Content (Offsite Conversion)
Cost - Website Applications Submitted
Cost - Website Appointments Scheduled
Cost - Website Canceled Subscriptions
Cost - Website Contacts
Cost - Website Donations
Cost - Website Location Searches
Cost - Website Products Customized
Cost - Website Recurring Subscription Payments
Cost - Website Subscriptions
Cost - Website Trials Started
Country
CPC
CPM
CPP
Created Time
Credit Spends
Credit Spends (Omnichannel)
CTR
Custom Events (Omnichannel)
Custom pixel events defined by the advertiser (Offsite Conversion)
Date From
Date To
Device Platform
DMA
Donations
Estimated Call Confirmation Clicks
Event Responses
Frequency
Frequency Value
Full View Impressions
Full View Reach
Game Plays
Gender Targeting
Hourly Stats Aggregated By Advertiser Time Zone
Hourly Stats Aggregated By Audience Time Zone
Impressions
In-App Ad Clicks
In-App Ad Impressions
Initiates Checkout (Offsite Conversion)
Inline Link Click CTR
Inline Link Clicks
Inline Post Engagement
Landing Page Views
Leads (Offsite Conversion)
Leads from Messenger and Instant Forms
Levels Achieved (Omnichannel)
Link Clicks
Location
Location Searches
Messaging Conversations Started (Onsite Conversion)
Messaging Subscriptions (Onsite Conversion)
Mobile App Achievements
Mobile App Adds To Cart
Mobile App Adds to Wishlist
Mobile App Applications Submitted
Mobile App Appointments Scheduled
Mobile App Canceled Subscriptions
Mobile App Checkouts
Mobile App Contacts
Mobile App Content Views
Mobile App Credit Spends
Mobile App Donations
Mobile App Feature Unlocks
Mobile App Installs
Mobile App Location Searches
Mobile App Payment Details
Mobile App Products Customized
Mobile App Purchases
Mobile App Ratings
Mobile App Recurring Subscription Payments
Mobile App Registrations
Mobile App Searchs
Mobile App Starts
Mobile App Subscriptions
Mobile App Trials Started
Mobile App Tutorial Completions
Mobile Purchase ROAS
New Messaging Conversations (Onsite Conversion)
Objective
Offline App Appointments Scheduled
Offline Applications Submitted
Offline App Location Searches
Offline Canceled Subscriptions
Offline Contacts
Offline Donations
Offline Products Customized
Offline Recurring Subscription Payments
Offline Subscriptions
Offline Trials Started
On Facebook Applications Submitted
On Facebook Donations
On-Facebook Purchases (Onsite Conversion)
On-Facebook Workflow Completions (Offsite Conversion)
Optimization Goal
Other Mobile App Actions
Outbound Clicks
Page Engagement
Page Likes
Page Photo Views
Place Page ID
Place Page Name
Post Comments
Post Engagement
Post Reactions
Post Saves (Onsite Conversion)
Post Shares
Product ID
Products Customized
Publisher Platform
Purchase ROAS
Purchases (Offsite Conversion)
Purchases (Omnichannel)
Ratings Submitted (Omnichannel)
Reach
Recurring Subscription Payments
Registrations Completed (Omnichannel)
Searches (Omnichannel)
Searchs (Offsite Conversion)
Social Spend
Spend
Subscriptions
Trials Started
Tutorials Completed (Omnichannel)
Updated Time
Views Content (Offsite Conversion)
Website Applications Submitted
Website Appointments Scheduled
Website Canceled Subscriptions
Website Contacts
Website Donations
Website Location Searches
Website Products Customized
Website Purchase ROAS
Website Recurring Subscription Payments
Website Subscriptions
Website Trials Started
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_METRICS_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.