Google.Apis.Requests.RequestError for AdSense/Publ

2019-07-21 02:12发布

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条回答
唯我独甜
2楼-- · 2019-07-21 02:58

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.

查看更多
登录 后发表回答