因为洞察力是活动对象的边缘,您可以通过该边缘上的点应用一些过滤器参数,如下所示:
https://graph.facebook.com/v3.3/<ad_account>/campaigns?fields=name,status,insights.date_preset(lifetime){reach,impressions,clicks}&access_token=<access_token>
或者,如果您想通过时间细分(例如三个月)检查 Insights 并查看生命周期摘要,您可以这样做:
https://graph.facebook.com/v3.3/<ad_account>/campaigns?fields=name,status,insights.default_summary(true).limit(3).date_preset(lifetime).time_increment(monthly){reach,impressions,clicks}&access_token=<access_token>
{
"name": "Campaign Name",
"status": "Campaign Status",
"insights": {
"data": [
{
"reach": "149599",
"impressions": "291917",
"clicks": "13517",
"date_start": "2019-01-11",
"date_stop": "2019-01-31"
},
{
"reach": "265556",
"impressions": "456458",
"clicks": "7915",
"date_start": "2019-02-01",
"date_stop": "2019-02-28"
},
{
"reach": "233641",
"impressions": "331600",
"clicks": "4671",
"date_start": "2019-03-01",
"date_stop": "2019-03-31"
}
],
"paging": {
"cursors": {
"before": "BFR",
"after": "AFT"
},
"next": "next link"
},
"summary": {
"reach": "660772",
"impressions": "1486924",
"clicks": "32484",
"date_start": "2019-01-11",
"date_stop": "2019-05-06"
}
},
"id": "000"
}
https://developers.facebook.com/docs/marketing-api/insights/parameters#param