Posts Tagged ‘API Integration’
API Python Client Library Updated
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:
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.
Posted by Nick Mihailovski, The Google Analytics API Team
An API Integration To Measure Significant Change
Sophisticated, useful and cool applications are being developed everyday through the open Google Analytics API. We’re loving what we’re seeing. Basically, developers are grabbing their data from Google Analytics and slicing and dicing it, mixing it and mashing it with other data and applications, creating dashboards and widgets, and innovating some of the coolest stuff a data driven person could hope for. For example, we’re really impressed with an app called Trendly which makes it easier to find important movers and shakers among your data via an innovative new interface, cutting down on the time you need to monitor your profiles. The team who built Trendly is using it as their one stop Google Analytics dashboard. We asked the team to share how this application came about, and here’s what they wrote:
How many of you can afford to pay someone to monitor your analytics full time? We can’t. We’re a small startup, and we just don’t have the resources to make that happen.We use Google Analytics to track visits to our website, www.dabbledb.com. We’d love to have someone watching the hundreds of keywords, referrers, and campaigns that drive traffic to our site, someone who would send us a quick email whenever something really interesting happened: “Hey guys, thought you’d like to know that your average visitors from ‘online database’ doubled last week, and it’s staying there – guess that SEO is working!”
So, using the Google Analytics API, we created Trendly, a monitoring and visualization tool which you can look at anytime and easily see what’s changed. In short, Trendly uses mathematical models to take noisy data like this:
and figure out when significant changes have happened, marking it like this:
According to Trendly, our average daily visitors from the search words “online database” went up from 18 to 32 in mid-January, and then up again to 50 in early February. Also, Trendly sends us periodic emails to let us know about changes like these, saving us a lot of time. It also prepares a news feed with attractive charts that put the changes into perspective relative to everything else that’s going on. Take a look at this – it calls out significant changes and makes them easy to notice with a timeline on the right.
When we first built Trendly for our internal use, we cobbled it together by screen-scraping and downloading exports from Google Analytics. But part of what made this tool exciting to us is that it solves a pretty universal problem. Trendly is your analyst until you can afford to hire a full time analyst. Heck, it probably keeps a clearer log of important changes than an analyst would! And with Trendly, you can delay this much longer since it cuts down your worflow by hours per week.The new GA Data API allowed us to share it! With no signup and a couple of clicks, anyone can authenticate with Google and authorize us to grab their data and generate the reports. Suddenly our internal tool became a new product offering which can help any Google Analytics user. Give it a try and see for yourself.
What the guys at DabbleDB built is amazing. If you have developed a useful new tool or integration on top of Google Analytics, drop us an email at analytics-api@google.com. If it’s innovative and useful we’ll highlight it to our readers on this blog.
Nick Mihailovski, The Google Analytics API Team




