问题描述
我无法从 https://developers.google.com/youtube/analytics/sample-requests#channel-audience-retention-reports
我在做什么错-我正在遵循API Explorer中的示例 https://developers.google.com/apis-explorer/#p/youtubeAnalytics/v1/youtubeAnalytics.reports.query?metrics=audienceWatchRatio%252CrelativeRetentionPerformance&dimensions=elapsedVideoTimeRatio&filters %253D%253DMY_VIDEO_ID%253BaudienceType%253D%253DORGANIC& start-date = 2014-05-01& end-date = 2014-06-30& ids = channel%253D%253DMY_CHANNEL_ID ,在我的频道和过滤特定视频.我确实获得了成功的响应,但实际上只是columnHeaders
:
What am I doing wrong - I am following the sample in the API Explorer https://developers.google.com/apis-explorer/#p/youtubeAnalytics/v1/youtubeAnalytics.reports.query?metrics=audienceWatchRatio%252CrelativeRetentionPerformance&dimensions=elapsedVideoTimeRatio&filters=video%253D%253DMY_VIDEO_ID%253BaudienceType%253D%253DORGANIC&start-date=2014-05-01&end-date=2014-06-30&&ids=channel%253D%253DMY_CHANNEL_ID, requesting on my channel and filtering on a specific video. I do get a succesful response, but it is essentially only the columnHeaders
:
{
"kind": "youtubeAnalytics#resultTable",
"columnHeaders": [
{
"name": "elapsedVideoTimeRatio",
"columnType": "DIMENSION",
"dataType": "FLOAT"
},
{
"name": "audienceWatchRatio",
"columnType": "METRIC",
"dataType": "FLOAT"
},
{
"name": "relativeRetentionPerformance",
"columnType": "METRIC",
"dataType": "FLOAT"
}
]
}
推荐答案
尝试一下.
假设您已经在您提供的链接,因为您能够提取ColumnHeaders结果.
It is assumed that you already provided your channelID in the link you've provided since you were able to fetch ColumnHeaders results.
您可能已经错过了:
- 在过滤器文本字段中提供上载视频的videoID.例如J78o42MAQhc.
- 将开始日期更改为您上传视频的实际日期.
然后进行身份验证并执行.
Then Authenticate and Execute.
这就是我得到的.
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)
...
这篇关于没有观众保留数据,但来自YouTube Analytics API的columnHeaders的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!