Google.Apis.Requests.RequestError for AdSense/Publisher related metrics

允我心安 提交于 2019-12-11 00:18:01

问题


Since yesterday, we have trouble getting data from the Analytics API for AdSense related metrics (ga:adsensePageImpressions, ga:adsenseAdsViewed, ga:adsenseCoverage etc.). Other metric like ga:sessions are still working.

Is this some permission problem?

From the main account, I can log into Analytics, and I do see current AdSense (Publisher) data.

.NET, Google.Apis.Analytics.V3 1.20.0.642 (up to date), Google.Apis.AnalyticsReporting.v4 1.20.0.698. Tried with V3 and V4, same error.

We are using a service account that has permission to access Analytics data. I’ve checked AdSense, Analytics, and API Management settings, but cannot find anything related.

Any suggestions?


回答1:


It looks like they have updated Analytics API and it's no longer possible to call API with AdSense/Publisher metrics for Analytics properties that do not have linked AdSense account.

Unfortunately, in cases where there are hundreds of sites and where some of the sites have AdSense, and other do not, you have to create different API calls for those two groups.



来源:https://stackoverflow.com/questions/41523956/google-apis-requests-requesterror-for-adsense-publisher-related-metrics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!