Get metrics such as clicks, CPC, CTR, and CPM about your Ads by date.
Name or ID of your Facebook Ads account. For example:
"Personal Ads account".
Name or ID of your ad. For example:
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.
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.
Date range to get insights for. For example:
"[2010-01-01;2019-01-01]". By default, you get insights for the current month.
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.
Access this page to check how you can find the account name or account ID.