Thursday, 17 December 2009

It's easier for developers to program in the languages they know, so we updated the Google Analytics API Python Client library with the just-launched API version 2 features. We also added reference examples for both the Account Feed and Data Feed. Now it's easier than ever to automate your analysis workflow using our API.

Taking The Library For a Spin

With the updated library, we thought it would be a great time to highlight the power of the new features. So we created a sample application to do just that. The application uses the new Python library to retrieve metrics for a series of segments. It then performs some calculations on the data and creates bar charts using the GChartWrapper package, an open source Python wrapper for the Google Charts API. Finally, it uses the Python Imaging Library to add a title and legend, and stitches all the charts together into a single image. We decided to release this application as open source so you can create visualizations with your own data.

Solving Business Problems

Since social media is all the rage, let's use this new application to help Avinash Kaushik, our Analytics Evangelist, measure "engagement" on his popular Occam's Razor blog. We also wanted to determine if the time he spends participating in social media sites is valuable and sends new readers to his blog.

First we created segments to pull all the referrals from Facebook and Twitter. Second, we chose five calculations and corresponding metrics to compare the performance of these two segments. We then compared the segments to each other and, for context, for all the visits to the site as a control.

They say a picture is worth a thousand words, here are the results:
Let's Analyze

Some interesting observations become apparent.
  • Far more visits originate from Twitter (3.6x) when compared to Facebook, perhaps not surprising given Avinash's Twitter followers (~16,120)

  • Visitors from Twitter tend to be new visitors, a good thing, but they view fewer pages and spend significantly less time on the blog.

  • On the other hand Facebook delivers an audience that is loyal. These visitors come back to the site more often and spend a significant time on the blog (compared to Twitter and all other visitors).
The bottom line? Even though social networking sites are all the rage, they actually contribute very little to Avinash's blog. If this blog were a company, it would be wise to ensure the time and effort put into driving traffic from social media is proportionate to the actual volume of traffic and goal conversions from those sites.

Hopefully this example shows how powerful our new features can be.

If you're interested in running this report against your own data, the application is free and open sourced. Additionally, we made it really easy to change the metrics, segments, calculations and all the other visual properties to power your own visualizations. Download it here and give it a whirl, we would love to hear your feedback.


Tagged: