【问题标题】:How to get Facebook graph API to return all ad campaigns with insights and publisher platform breakdowns如何让 Facebook 图形 API 返回所有具有洞察力和发布商平台故障的广告活动
【发布时间】:2019-06-09 22:21:24
【问题描述】:

我想了解某个帐户的所有广告系列的数据分析和细分。我几乎可以肯定我无法从故障中得到publisher_platform,因为我们使用的是campaigns Edge。是否有其他方法可以获取正在运行的广告系列的 network/publisher_platform?

请求

act_XXX/campaigns?fields=insights{impressions,account_id,account_currency,spend,cost_per_inline_link_click,actions,website_ctr},effective_status,start_time,stop_time&limit=1&breakdowns=publisher_platform&time_rage={"since":"2018-01-02","until":"2018-02-02"}

回应

  "data": [
    {
      "insights": {
        "data": [
          {
            "impressions": "90",
            "account_id": "111111111111",
            "account_currency": "USD",
            "spend": "0.69",
            "actions": [
              {
                "action_type": "comment",
                "value": "2"
              },
              {
                "action_type": "photo_view",
                "value": "2"
              },
              {
                "action_type": "post_reaction",
                "value": "10"
              },
              {
                "action_type": "page_engagement",
                "value": "14"
              },
              {
                "action_type": "post_engagement",
                "value": "14"
              }
            ],
            "date_start": "2018-12-16",
            "date_stop": "2019-01-14"
          }
        ],
        "paging": {
          "cursors": {
            "before": "MAZDZD",
            "after": "MAZDZD"
          }
        }
      },
      "effective_status": "ACTIVE",
      "start_time": "2019-01-14T12:52:16-0600",
      "stop_time": "2019-01-21T12:52:13-0600",
      "id": "23843254853610607"
    }
  ],
  "paging": {
    "cursors": {
      "before": "QVFIUkdVQ1p2ZATVNb01JUE55dU9VWWQ3MmxYTTNkSVRNQlI0alg4N2lzZA2FRZAGNDSzVvcDZAhTEF0RDJoZAWVHT09KTjVTeTBIMVpoQ0lmN3Q2djI3b2E2ek9n",
      "after": "QVFIUkdVQ1p2ZATVNb01JUE55dU9VWWQ3MmxYTTNkSVRNQlI0alg4N2lzZA2FRZAGNDSzVvcDZAhTEF0RDJoZAWVHT09KTjVTeTBIMVpoQ0lmN3Q2djI3b2E2ek9n"
    },
    "next": "https://graph.facebook.com/v3.0/act_xxxxx/campaigns?access_token=xxxxxxxx"
  }
}

我发现这个请求完全返回响应非常令人沮丧,因为它不尊重breakdown 参数。

【问题讨论】:

    标签: facebook facebook-graph-api ads facebook-ads-api


    【解决方案1】:

    这是 8 个月前提出的问题,但正在回答有相同问题的人。

    使用

    act_XXX/campaigns?fields=insights.fields(<fields>).breakdowns(<breakdowns>)
    

    所以在你的情况下,它是

    act_XXX/campaigns?fields=insights.fields(impressions,account_id,account_currency,spend,cost_per_inline_link_click,actions,website_ctr).breakdowns(publisher_platform),effective_status,start_time,stop_time&limit=1&time_rage={"since":"2018-01-02","until":"2018-02-02"}
    

    【讨论】:

      猜你喜欢
      • 2017-07-23
      • 1970-01-01
      • 2016-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多