Why doesn’t Google analytics have an API?

I really want an API for Google analytics, I have some specific ideas for combining analytics data with other data available via external APIs but for some reason Google are jittery about people publishing the data collected about their site traffic.

Thankfully a good few people have put their screen-scraping skills to use in order to provide some solutions to this problem. I recently stumbled upon Chris Riley’s post detailing one method of extracting Analytics data, the basic process is as follows:

  1. Obtain the tracking data in a usable format – We can schedule Google Analytics to email this as an XML file on a regular basis.
  2. Make the XML file accessible online – By emailing an attachment to Google Groups, the file is automatically given a public URL.
  3. Work out the URL of the most recent report – Since Google Groups provides RSS/Atom feeds for all messages, we can easily find the URL of the most recent message and therefore work out the URL of the XML report.
  4. Prepare the data for use – We need to manipulate the XML and massage it into a handy JSON format that we can use on our blog, which can all be done using Yahoo Pipes.
  5. Display the links on your site – With just a bit of client-side JavaScript, you can finally add a self-updating “Most Popular Posts” section to your blog.

See the full details at Google Blogoscoped

I just can’t work out why Google, who are normally excellent in terms of providing open APIs for their services, have yet to allow customers to make better use of their traffic data. Perhaps they are concerned with the privacy issues of exposing data collected concerning the browsing habits of web-users. I’m sure that this could be remedied by limiting the extent to which data can be drilled into through the API. Possibly they don’t feel that it’s not a good use of resources to build an API for a free product which already has a large user base. It may take a competitor who does provide an API to gain some market share before they decide to do something about it.

8 Responses

  1. Tom says:

    I wouldn’t waste too much time messing around with emails and extracting data using pipes and stuff, Google say it’s ‘coming soon’ and I can’t see that they can hold out too much longer.

    Their Data Export Api is in private beta at the moment, see http://analytics.blogspot.com/2008/10/more-enterprise-class-features-added-to.html

    It wouldn’t suprise me if it’s simply been a case of working out how best to serve up the data as looking at the XML you can get back from it as an email attachment it’s pretty full on.

  2. Dave says:

    Thanks Tom, I searched the analytics support section and couldn’t find anything other than this: http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55561

    Google Analytics does not currently provide an API to access the reporting data. However, we do offer export functionality for single reports in the following formats:

    Tab separated (Text)
    XML
    Excel (CSV)

    This feature allows you to easily import report data into your favorite spreadsheet application or to process the data otherwise.

  3. colleen says:

    Yeah! So the commenter thinks pipes is a waste of time, eh? But Google still doesn’t let access their analytics. Google’s tools are pretty rockin. but I’d like to see an API too.

  4. I’ve been looking for data on this for the last 2 hours. What I haven’t been able to figure out with the “Export Function” is HOW MUCH data can it export? From what I have seen, it only exports sections of data (I might be wrong).

    I can’t wait for an API – I’m going to have to do the best with that Export function into XML as I need backups of my data.

  5. Makiaveli says:

    They have an Open API, you just have to be GAAC to get it

  6. Izzy says:

    Welp, after waiting and waiting on Google to release an API, I’ve decided to go with Clicky for all my clients moving forwards. The Google Analytics reports offer far more depth, but it’s currently a walled garden, and Google’s given no real indication of when (or if) they’ll ever actually release a free public data export api. My business can’t wait, and most of my customers don’t really need the depth that Google offers.

  7. Dave says:

    Update: At last, we have an API for everybody – http://webdeveloper2.com/2009/04/google-analytics-api-launched/

Pings

  1. [...] ranted about the lack of an API for Google Analytics back in November last year, now at last we have an easier way to use our analytics data. A Google Analytics API has [...]

Leave a Reply