Get metrics such as clicks, CPC, CTR, and CPM about your Ad campaigns by date.
Name or ID of your Facebook Ads account. For example:
"Personal Ads account".
Name or ID of your compaign. 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 campaign insights by time period. By default, it will group the campaign 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.