Search code examples
google-analyticsgoogle-analytics-api

Google Analytics API v3 : Unknown metric(s): ga:adsenseAdsViewed, ga:adsenseAdsClicks, ga:adsenseRevenue, ga:adsenseAdUnitsViewed


It seems that something has changed last thursday/friday with the following metrics : ga:adsenseAdsViewed, ga:adsenseAdsClicks, ga:adsenseRevenue, ga:adsenseAdUnitsViewed

I was able to pull these metrics before and since a while and I'm no longer able to have these metrics since last friday.

I'm hit by : Unknown metric(s): ga:adsenseAdsViewed, ga:adsenseAdsClicks, ga:adsenseRevenue, ga:adsenseAdUnitsViewed

I went to the API change logs, no changes since 2016-10-12. These metrics also are still showing available in the documentation.

In the past, this already happened and a quick retry fixed the issue - but this is no longer the case right now.

Does someone has already got the same issue? Are these field removed? Something else?

Thank you a lot for any feedback


Solution

  • This issue has been fixed in the latest release, see changelog for details.

    AdSense dimensions and metrics

    This release fixes an issue which started on 1/7/2017 in which querying for AdSense dimensions and metrics would return an Unknown Metric error for non-AdSense linked views.

    Coming changes

    On or after 1/31/2017 non-AdSense linked views will be restricted from querying for AdSense dimensions and metrics. Querying for these dimensions and metrics with a non-AdSense linked views will result in an error.

    Update your code

    If possible link the views with the AdSense account when needed otherwise you should check the error messages and have your client respond accordingly.