使用 Analytics 2.0 API 获取并行查看者 JSON 报表数据

您可以使用 Analytics 2.0 API 获取并行查看者报表数据。

  1. 使用在 UI 中构建的任何区段过滤数据。要按特定内容 ID 进行过滤,请创建新区段。

  2. 将请求主体中的 elements -> id 设置为 metrics/concurrent_viewers_visitors

  3. 请求足够数量的数据。

    • 您在报表中指定的数据范围会“在视频会话结束时”收集所有并行查看者数据。__
      因此,您必须考虑从前一天开始,到午夜之后(即第二天)结束的会话。

    • 在您的请求中,在预期时间段后再请求一天的数据,但在您的分析中,“仅使用预期数据”。**

一天数据的请求有效负荷类似于以下示例。请求将连续 2 天完成,但在报表中,您只使用第一天。

示例请求

{
    "rsid": "[YOUR_RSID]",
    "locale": "en_US",
    "dimension": "variables/daterangeminute",
    "globalFilters": [
        {
            "dateRange": "2020-09-02T00:00/2020-09-03T00:00",
            "type": "dateRange"
        }
    ],
    "metricContainer": {
        "metrics": [
            {
                "columnId": "column1",
                "id": "metrics/concurrent_viewers_visitors"
            }
        ]
    },
    "settings": {
        "dimensionSort": "asc",
        "limit": "2000",
        "page": 0
  }
}

示例响应

{
   "totalPages":1,
   "firstPage":true,
   "lastPage":true,
   "numberOfElements":1440,
   "number":0,
   "totalElements":1440,
   "columns":{
      "dimension":{
         "id":"variables/daterangeminute",
         "type":"time"
      },
      "columnIds":[
         "column1"
      ]
   },
   "rows":[
      {
         "itemId":"12008020000",
         "value":"00:00 2020-09-02",
         "data":[
            123.0
         ]
      },
      {
         "itemId":"12008020001",
         "value":"00:01 2020-09-02",
         "data":[
            143.0
         ]
      },
      {
         "itemId":"12008020002",
         "value":"00:02 2020-09-02",
         "data":[
            167.0
         ]
      },

      ...
      {
         "itemId":"12008022359",
         "value":"23:59 2020-09-02",
         "data":[
            768.0
         ]
      }
   ],
   "summaryData":{
      "filteredTotals":[
         17124.0
      ],
      "totals":[
         18453.0
      ]
   }
}

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now