This week I have mainly been playing with the Google Analytics API

Posted by Malcolm Slade on Friday, May 15th, 2009 in Google, Google Analytics, SEO

10 PRINT HELLO WORLD 20 GOTO 10

At heart, I am a code monkey. I love to code. Some of my strongest memories of my childhood revolve around sitting with my Grandfather, inputting reams and reams of code into a BBC Model B and spending the following month debugging it. So when Google finally released its Analytics API as a public beta (cough) I immediately started considering what I could do with it and how.

Now to clarify, this isn’t a technical post and I won’t discuss my actions or intentions. At the moment, I have had little more than a play around – so sorry! I plan to do a basic guide style post in the future, which will be much more technical (if it hasn’t already been exhausted by then), but for now I will just review the history, potential and some of the stuff that’s already happening.


Background

Since its launch as a free analytics package in 2005, Google Analytics has become immensely popular. It has its limitations much like any other analytics package but through recent developments including the switch from urchin.js to ga.js and the addition of custom filtering it has become a pretty solid platform – a platform that provides access to a hell of a lot of information and varying ways of viewing it.

In a way, one of the positives with Google Analytics is, in turn, a flaw. By providing access to such an abundance of data, reports, filtering options etc. it has become inoperative to some and even clunky to navigate at times.

About a year ago, Google first announced its API as a private beta project open to a select few. It has now come into the light as a public beta project (God only knows if it will ever come out of beta) with similar limitations to most other APIs, such as a maximum of 10,000 requests by a given web property (presumably IP address) and 100 requests within a 10 second period. Whether these limitations will be eased in the future as other popular applications arise I don’t know, but at the moment, it isn’t stopping people being extremely creative and investigating the true potential.

What does this all mean?

Basically, by producing an API, Google have provided access to all the information present within Google Analytics without the need to use the standard Google Analytics interface. This means the data can be viewed in even more ways and reduced to the essential information. Your imagination is the limit well, apart from the request limits, coding restrictions…..

Potential uses

At launch, Google provided interfaces for Javascript and Java. Already several very clever people have expanded this via user contributed libraries for Python, PHP, .NET and more. Most languages have graph plotting extensions and bolt-ons such as JPGraph for PHP by now. So in theory, you create an application that authenticates itself with Google Analytics, requests data, manipulates the returned data and visualises it in a graph, a chart, or any other appropriate fashion.

I may want a box on my website detailing where my latest visitors come from, which of my blog posts are the most popular, what words people use to visit my site etc. Some noted applications already developed are;

There is also a list containing some of these and more at http://code.google.com/apis/analytics/docs/gdata/gdataGallery.html.

As you can see some people have already put considerable time into their ideas and I would expect this to continue with some really revolutionary stuff coming soon from reskins to complete outside of the box utilities.

I know I can’t wait to put some time aside to mash something together using JPGraph or similar with PHP to see what I get.

Malcolm Slade

Resources

http://code.google.com/apis/analytics/docs/gdata/gdataDeveloperGuide.html – The official documentation area.
http://www.electrictoolbox.com/google-analytics-api-and-php/ – The stuff I have been reading regarding using PHP.
http://www.aditus.nu/jpgraph/, http://www.maani.us/charts/index.php, http://graphpite.sourceforge.net/ – some of the popular graph creation tools one of which I will very likely be using.

  • Digg
  • Sphinn
  • StumbleUpon
  • Reddit
  • Technorati
  • del.icio.us

Respond to 'This week I have mainly been playing with the Google Analytics API'