如何获取广告组汇总的网页浏览次数,发布份额和网站点击次数。发布评论和发布的评论是通过字段' inline_actions' - https://developers.facebook.com/docs/reference/ads-api/adreportstats#columns(/ reportstats / date_preset =昨天& data_columns = [' adgroup_id',' inline_actions']& actions_group_by = [' action_type']) 。我需要一种方法来使用api获取这些报表项,就像使用https://www.facebook.com/ads/manage/reporting.php返回它们一样。
答案 0 :(得分:1)
要获取每个广告组级别的数据,您必须在adgroup_id
中加入adgroup_name
或data_columns
- 正如您所做的那样。
评论,喜欢和许多其他操作都会在actions
列
您可以通过指定过滤器来指定您感兴趣的操作类型:
filters=[
{
"field": "action_type",
"type": "in",
"value": [
"like",
"page_engagement",
"post_engagement",
"post_like",
"comment",
"games.plays",
"post",
"photo_view",
"link_click",
"receive_offer",
"checkin",
"mention",
"tab_view",
"vote",
"follow",
"gift_sale",
"video_play",
"video_view",
"offsite_conversion",
"offsite_conversion.checkout",
"offsite_conversion.registration",
"offsite_conversion.lead",
"offsite_conversion.key_page_view",
"offsite_conversion.add_to_cart",
"offsite_conversion.other",
"app_install",
"app_engagement",
"app_story",
"app_use",
"credit_spent",
"mobile_app_install",
"app_custom_event",
"app_custom_event.fb_mobile_activate_app",
"app_custom_event.fb_mobile_complete_registration",
"app_custom_event.fb_mobile_content_view",
"app_custom_event.fb_mobile_search",
"app_custom_event.fb_mobile_rate",
"app_custom_event.fb_mobile_tutorial_completion",
"app_custom_event.fb_mobile_add_to_cart",
"app_custom_event.fb_mobile_add_to_wishlist",
"app_custom_event.fb_mobile_initiated_checkout",
"app_custom_event.fb_mobile_add_payment_info",
"app_custom_event.fb_mobile_purchase",
"app_custom_event.fb_mobile_level_achieved",
"app_custom_event.fb_mobile_achievement_unlocked",
"app_custom_event.fb_mobile_spent_credits",
"app_custom_event.other",
"rsvp"
]
}
]
然而,这是可选的IIRC,API默认会向您发送所有非零操作。