我无法从https://developers.google.com/youtube/analytics/sample-requests#channel-受众保留报告
我做错了什么?我在API资源管理器中遵循示例https://developers.google.com/apis-explorer/#p/youtubeAnalytics/v1/youtubeAnalytics.reports.query?metrics=audienceWatchRatio%252CrelativeRetentionPerformance&dimensions=elapsedVideoTimeRatio&filters=视频%253D%253DMY_video_ID%253BauienceType%253D=253DORGANIC&开始日期=2014-05-01&结束日期=2014-06-30&;ids=通道%253D%253DMY_channel_ID,在我的通道上请求并过滤特定视频。我确实得到了成功的响应,但它本质上只是columnHeaders
:
{
"kind": "youtubeAnalytics#resultTable",
"columnHeaders": [
{
"name": "elapsedVideoTimeRatio",
"columnType": "DIMENSION",
"dataType": "FLOAT"
},
{
"name": "audienceWatchRatio",
"columnType": "METRIC",
"dataType": "FLOAT"
},
{
"name": "relativeRetentionPerformance",
"columnType": "METRIC",
"dataType": "FLOAT"
}
]
}
试试这个。
假设您已经在提供的链接中提供了channelID,因为您能够获取ColumnHeaders结果。
你可能错过了这个:
- 在过滤器文本字段中提供上传视频的视频ID。例如J78o4 2MAQhc
- 将开始日期更改为您上传视频的实际日期
然后验证并执行。
这是我得到的。
200
- Show headers -
{
"kind": "youtubeAnalytics#resultTable",
"columnHeaders": [
{
"name": "elapsedVideoTimeRatio",
"columnType": "DIMENSION",
"dataType": "FLOAT"
},
{
"name": "audienceWatchRatio",
"columnType": "METRIC",
"dataType": "FLOAT"
},
{
"name": "relativeRetentionPerformance",
"columnType": "METRIC",
"dataType": "FLOAT"
}
],
"rows": [
[
0.01,
1,
0.2780657051338946
],
[
0.02,
0.821917808219178,
0.22789225435683402
],
[
0.03,
0.7123287671232876,
0.1979482394027498
],
[
0.04,
0.5753424657534246,
0.19664082667236166
],
[
0.05,
0.4931506849315068,
0.21083662779019507
]
(more results)
...