Shared publicly  - 
 
Many developers use the Google Analytics API to automate time-consuming tasks in the GA web interface. For example getting top level metrics for different websites. Instead of spending an hour pulling reports every week, developers can write a script to do all this data extraction and reporting before they get into work. That way they can spend time focusing on analysis.

When writing these automation scripts, I've found the Google API Python library to be one of the easiest libraries to use. First, Python code is really easy to read. Second, the Google API Python library has some really nice helper methods to store and reuse tokens.

Anyways, I just checked in 3 getting started with the Google Analytics API samples using the google-api-python lib: http://code.google.com/p/google-api-python-client/source/browse/samples/analytics/

If you've never used our API before, or don't use python, take a look at the hello_google_analytics_api_v3.py code: http://code.google.com/p/google-api-python-client/source/browse/samples/analytics/hello_analytics_api_v3.py

It's super easy to follow, and using it as a template to automate reports can start saving you LOTS of time!
9
7
Juraj S's profile photoChad Thoreson's profile photoRishi Yadati's profile photoGayane Dallakyan's profile photo
 
Hey Claudiu,

Wow. You're automating 500 reports all through Google Spreadsheets ?! ;) I didn't know Google Spreadsheets could do that.

So the Google Analytics service doesn't return 504s, and double checking in our logs, for the last 9 days I didn't see any 504s either. If you want to followup privately with more details we can take a look. My gut reaction is you're hitting an OAuth proxy timeout going through Google Spreadsheets...but not sure.
Add a comment...