1

I've managed to get API working but it is reporting numbers which are always a bit lower than the ones reported by AdSense web (or mobile app) interface.

This is the response from API explorer:

 "kind": "adsense#report",
 "totalMatchedRows": "1",
 "headers": [
  {
   "name": "EARNINGS",
   "type": "METRIC_CURRENCY",
   "currency": "EUR"
  },
  {
   "name": "CLICKS",
   "type": "METRIC_TALLY"
  }
 ],
 "rows": [
  [
   "7.58",
   "17"
  ]
 ],
 "totals": [
  "7.58",
  "17"
 ],
 "averages": [
  "7.58",
  "17"
 ],
 "startDate": "2019-10-07",
 "endDate": "2019-10-07"
}

For example, for two days ago (2019-10-07) web interface is showing 24 clicks with estimated earning of 7,65 EUR and when I call API for the same day it shows 17 clicks and earning of 7,58 EUR.

And for every other day numbers are lower than the ones on the web interface.

Dejan
  • 21
  • 2
  • The numbers between the UI and the API should be the same. (Just to clarify, you're not using the AdMob UI, right?) – Donovan McMurray Oct 09 '19 at 21:44
  • No, I'm not using AdMob. I also use AdSense app on iOS and it shows the same numbers as on web. It's only the API that is showing wrong numbers. – Dejan Oct 10 '19 at 13:03

1 Answers1

1

I found the answer to this. If you leave out "useTimezoneReporting" parameter then it will default to PST timezone which is far away from me. When you set this parameter to "true" then it generates numbers based on AdSense account timezone.

Now everything works fine.

Dejan
  • 21
  • 2