如何使用 Youtube Analytics API 获取指标“收益"? [英] How to use the Youtube Analytics API to get the metric "earnings"?

查看:26
本文介绍了如何使用 Youtube Analytics API 获取指标“收益"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 YouTube 合作伙伴,我在 YouTube 上通过视频获利.已通过与我的 Google Adsense 帐户相关联的某些渠道每月收到少量金额.

I am a Youtube Partner and I have monetized videos on Youtube. Already receive a small monthly amount through some channels that have associated with my Google Adsense account.

现在,我想生成一份报告,收集从每个渠道收到的货币价值和观看次数.我在谷歌代码上做了以下问题,因为我认为API有问题,但发生了我错误地使用API​​的问题.请参阅下面的链接.

Now, I would like to generate a report gathering the monetary values and views received from each channel. I did the following question on Google Code, because I thought there was some problem in the API, but it happened that I was using the API incorrectly. See the link below.

http://code.google.com/p/gdata-issues/issues/detail?id=4826#makechanges

现在,我仍然无法使它工作,因为我不知道在从上面的链接得到的响应中在哪里可以找到所请求的数据.

Now, I still could not make it work because I do not know where to find the requested data in the response I got from the link above.

在哪里可以找到这个 CMS_ID?我有多个频道,所以我需要让每个频道都被接受为 Youtube 内容经理才能使用 API 并获取收益?Stack Overflow 上的某个人已经设法使用指标收入"来使用 Youtube Analytics API?

Where do I find this CMS_ID? I have more than one channel, so I need to have each accepted as a Youtube Content Manager to use the API and retrieve the gains? Someone here on Stack Overflow already managed to use the Youtube Analytics API using the metric "earnings"?

我的代码是基于来自 Google 的示例使用 Python 编写的:

My code is in Python based on the example from Google here:

https://developers.google.com/youtube/analytics/v1/code_samples/python

我正在使用以下范围:

YOUTUBE_SCOPES = ["https://www.googleapis.com/auth/youtube.readonly",  
                      "https://www.googleapis.com/auth/yt-analytics.readonly", 
                      "https://www.googleapis.com/auth/youtubepartner",
                      "https://www.googleapis.com/auth/yt-analytics-monetary.readonly"]

推荐答案

截至目前,只有当 YouTube 分析 API 报告通过内容所有者的上下文运行时,才能在这些报告中检索货币信息,如中所述文档.

As of right now, it's only possible to retrieve monetary information in YouTube Analytics API reports when those reports are run via the context of a content owner, as described in the documentation.

可能有一个已选择使用 Google AdSense 广告的获利频道,而该频道无需由内容所有者管理,在这种情况下,您将无法通过 YouTube 分析 API 获取这些指标.

It is possible to have a monetized channel that is opted in for Google AdSense ads without having that channel managed by a content owner, in which case you would not be able to get those metrics via the YouTube Analytics API.

让我们使用您之前打开的问题跟踪向非内容所有者开放此类报告的请求,因为与 Stack Overflow 相比,这是一个更适合功能请求的地方.

Let's use the issue you previously opened to track the request to open up this type of report to non-content owners as well, as that's a more appropriate place for feature requests than Stack Overflow.

这篇关于如何使用 Youtube Analytics API 获取指标“收益"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆