1
votes

I've been having issues with the Google Analytics (GA) API over the past several weeks. Our application regularly (every 2h) queries the GA API for visitor numbers from clients of ours.

However, sometimes the GA API suddenly returns only 0s for page metrics that previously provided data. This doesn't happen for all websites, only for a few, occasionally. The problem always starts around midnight (GMT) and persists for up to 24 hours.

It definitely isn't a quota error, as we would have caught that. In fact, Google's API doesn't return any error at all, it just returns 0s for all requested metrics.

Has anyone experienced this issue before? How can I solve this as it's bit of a show stopper.

1
I've been having this issue as well! Incredible. - TheBigDoubleA
This isn't really a programming question. If you are wanting to report a bug, you should send it directly to Google Analytics via their issue tracker: code.google.com/p/analytics-issues/issues/entry - Philip Walton

1 Answers

1
votes

In the hope this also helps other people I found the answer to my question by scouring the documentation:

https://support.google.com/analytics/answer/1070983?hl=en

Processing latency is 24-48 hours. Standard accounts that send more than 200,000 sessions per day to Google Analytics will result in the reports being refreshed only once a day. This can delay updates to reports and metrics for up to two days. To restore intra-day processing, reduce the number of sessions you send to < 200,000 per day. For Premium accounts, this limit is extended to 2 billion hits per month.

i.e if you are querying a non premium google analytics account with more than 200,000 visitors per day you can expect there to be intermittent lags in results for the last 48 hours. This issue was observed by us as google returning 0's, rather than some error.

This makes sense from Google's perspective as data processing = cost, as such it makes sense to leave processing for large sites (which are not paying for GA anyway) for when servers are loaded less heavily.