Andrea Zonzin
Andrea Zonzin

Reputation: 1154

Last “end date” with data in Analytics

I'm using "Reporting google Analitics API" and I can’t find information about what the last “end date” with data in Analytics is. For example, let's suppose you want to retrive the last month’s data. When do you have to perform the query? The first day of the current month? ...or the second one? ...or maybe the third one?

And only another question: are the returned data for days in pacific time?

Upvotes: 0

Views: 365

Answers (1)

Eduardo
Eduardo

Reputation: 22834

Google Analytics API is supposed to have access to the same data you have in the interface.

Google says that data can take up to 24h to process. The time it takes to really update the data depends on the type and size of the account. Small accounts are updated multiple times a day and can have data available in just a few hours. Once you reach 1M hits a month you are moved to a different mode where the data on your account is updated only once a day. Google Analytics Premium customers have updates more often even for large ammounts of traffic.

There's no way to tell through the API what is exactly the time of the last hit processed. You can query the data for today by the hour and see for yourself though.

Usually you don't care and just want to make sure that the data you're querying has been fully processed for that day.

So if you query data for yesterday there's a chance it has not being completely updated, for example if it's midnight the data for yesterday is just a couple minutes ago and probably haven't been completely processed yet. The safest bet in this case is to query data for 2 days ago.

So if today is 2012-06-15 and you want to get 1 month of data a safe approach is to query data with start-date=2012-05-13 and end-date=2012-06-13. This will most of the time give you data for days that have been fully processed, but it's not 100% safe as well. Google Analytics have had outages in the past where data took longer than that to process, these are not usual though. When you get the data out it's really hard to tell just for the API if the data for those days have been fully processed or not, using the 2 days ago isea you just make it more likely that it is.

The days are aggregate following your timezone settings configured on the Google Analytics profile.

Upvotes: 1

Related Questions