Vasco de Gapi: Google Analytics API Explorer
By Sal Uryasev
April 29, 2009
Find more about:
googleanalytics
api
python
Are you ready to explore the Google Analytics API?
At Juice, we were very excited about the public release of the Google Analytics Data Export API. Our product Concentrate has been running on a hackish home-brew Google Analytics export tool since its release last November, and we were happy to be able to relaunch as a Customer Example of the Google Analytics Data Export API.
Today, we are releasing a new, free tool called Vasco de GAPI. Vasco is a web-based tool for exploring the API, for downloading complex slices of data using the API, and to even automatically generate code that will allow coders easy replication of the API calls in question. Instead of describing it in more detail, I am just going to demo it.
I am going to start with a relatively rare but curious functionality of Google Analytics. I keep track of who wrote each blog using a Google Analytics user-defined setting that is set to the author's name for each specific blog post. Slicing our blog by author can be cool for me as an employee so that I can brag during my yearly review about how many visitors I bring in or what natural search visits we get for free as a result of my posting. For the demo, I'm going to discover the natural keywords that bring traffic to my blogposts on the website.
Let's get started.
The first step is to authenticate using Google's OAuth system.

I select ga:keyword as a dimension.

ga:pageviews is the metric I am interested in. The results will automatically get sorted by the first metric, so I do not need to explicitly specify a sort value.

I set ga:userDefinedValue as a filter, and filter it to saluryasev, and select this last week as a reference point.

Here is the list of parameters that Vasco de GAPI is passing to google.

What are my results?

It turns out that of all my posts, the Google Trends API that I put out about a year ago drives the most natural traffic to our site. Hopefully, this will change with a few more blog posts, but this is still rather interesting data. I could target that specific audience with something Google-trendy. On an unrelated note, a slap to my face was that Zach's name sent fifteen users to my blogposts. Go figure. Sixteen users searched on my last name, and were probably looking for my more popular father.
To get at the rest of the data, I can click the download link at the bottom of the page or, for developers, another link downloads working code that will replicate this exact pull.
Vasco runs using an open source Python gdata wrapper for the API that can be downloaded here. This wrapper is powerful, and I will write another blogpost about it next week. It is plugged into the Google gdata module, and as such allows all forms of authentication available to gdata users, including OAuth, AuthSub, and clientside.
Hopefully, Vasco de GAPI can help all other potential explorers sail smoothly through the API. When it comes to data, Google is just an great company. They have had powerful APIs for most of their major services for years, and while the Analytics API is a latecomer, it actually is more powerful than the analytics interface itself. This sort of openness is something to be envied by all other analytics and web companies in the market.
By the way, please let me know if the explorer theme works well. It was a lot of fun working on a project with a slightly esoteric approach.
Enhanced Google Analytics: Firefox Plugin
By Sal Uryasev
April 13, 2009
Find more about:
search,
google
analytics
There is new life in the tool that shows change in Google Analytics. A year after releasing our Greasemonkey script, we are pleased to release an updated version of the Enhanced Google Analytics script as a free Firefox Plugin. For those already using the older Greasemonkey script, you can skip ahead to the What's new? and How do I get this plugin? sections of the page. For the rest, you may be wondering: Why does my Google Analytics need change?
Change, and why it is important
When I first started working at Juice Analytics, my boss Zach showed me a part of his daily Google Analytics routine. He would open up the Referring Sites page, glance at all of our 942 referrers. Using his superior intellect and capacity for remembering random urls, Zach would discover interesting deviations in the traffic from sites linking to our blog.
Our top referrers looked more or less similar day to day. Even once you get past the more recognizable top sites such as Twitter and Google, the various somethingblog.com pages, without context, often look a lot like somethingelseblog.com. To top it off, most of the information is not even specifically interesting. Our chartchooser.juiceanalytics.com domain sends us consistent regular referrals, but so what? Day to day, I don't even really care about Google or Twitter unless something changes. With change, I know whether someone has posted something new about me, sending valuable traffic. A good read on the topic is Avinash's rant about "actionable analytics".
Our Firefox plugin is designed to allow analysts to get more action out of what changed in the Referring Sites and Keyword Reports. Here are a couple examples of the plugin in action from our Google Analytics account:

What's new?
Our focus for this release has been to improve functionality, to reduce the barrier to entry for new users, and to allow automatic updates for the plugin. The new version of the script works nearly instantaneously, and the installation involves only two clicks (in contrast to the 7 clicks of the Greasemonkey version). As a Firefox plugin, updates are now automatic and require no reinstall. Keyword sensitivity has been raised to 50% for consistency. As a slight bonus, the design and layout of the form and buttons is now sleeker and the table stands out in a pretty Google blue.
Greasemonkey itself is no longer required for the plugin, but you may want to keep it around for any of the other cool scripts available from the community. If you ever find yourself wishing that something about the web looked different, acted different or had different functionality, there may be a Greasemonkey script to ease your pain.
How do I get this plugin?
First, you need Firefox 2.0+.
If you are a user of the equivalent older Greasemonkey version of this script, you may want to go ahead and uninstall it. Go to Tools=>Greasemonkey=>Manage User Scripts..., select Google Analytics Downloader, and uncheck the Enabled box.
If you never had the script installed, or once you removed it, simply click here to go the mozilla addon site, select the checkbox and click the button. Once installed, navigate to Google Analytics, and go to either the Referring Sites or Keyword pages, and click the blue button.
Happy analyzing!
45 comments | Show all comments only the last 5 are shown
Andrew said:
You claim that it is for Firefox 2.0+. Do you plan on supporting 3.5 anytime soon?
Sal Uryasev said:
Hey Andrew,
I just test the add-on against latest 3.5 Firefox, and there were no conflicts, so I enabled add-on installation for the latest beta versions. I think the addons.mozilla site takes up to 24 hours or so to propagate changes, so check back then. Thanks for pointing this out.
-Sal Uryasev
Bjoern said:
Quick question: The most current version I see is 0.54 - and that was released on March, 19. Is this just the blog post following up on that release or am I missing a newer version somewhere?
Best, Bjoern
Bjoern said:
Oh, and: The plugin doesn't work correctly if G.A. is run in another language than English, e. g. German - I get empty tables on that occasion.
Ophir said:
Hi,
There's a bug - it takes the 1st account in your account access list and pulls data on that one only, regardless of the account you selected to view.
Ben said:
Hi,
I'm getting the same bug as Ophir. The plugin is only displaying data from the first profile of my first account regardless of the account I'm viewing.
Matt said:
Yep, same bug here too. Uses first account no matter what.
Brandon said:
I just installed "Enhanced Google Analytics: Firefox Plugin" I'm a visual learner and I don't see the tool bar, icon..etc. How do I use the Enhanced Google Analytics: Firefox Plugin to get key words and see the analytics/states
Thank you,
Zach said:
The "Who sent me unusual traffic?" button is displayed in the top bar of the Referring Sites and Keyword Reports, next to the Email button.
Sal Uryasev said:
Thanks for all the comments regarding the first account bug!
I finally managed to overcome the yoke of many other projects, and submit a fix.
The fix won't roll out automatically until the mozilla people finally approve the addon, but the 0.55 version can be installed for existing users this link:
https://addons.mozilla.org/en-US/firefox/addons/versions/11120
Hideki said:
Thanks for such a useful plugins.
3 "Who sent me unusual traffic?" buttons are displayed in Google Analytics. I had installed your plugins before. Is this a cause?
I uninstalled the plugin and then I installed the plugin again but still 3 buttons are seen.
Is there any way to solve this?
I would appreciate if you might help me.
Thanks,
kenan said:
I have 3 buttons on the top too. The first button works the others don't. Still the function of the script seems ok. So prolly it's just a cosmetic bug.
Indurango said:
Hello,
I installed "Enhanced Google Analytics: Firefox Plugin"
And it works fine. Thanks.
BUT, is there a way to change the analyse going back to 30 days instead of 3 days with the new firefox plugin ?
Regards,
Indurango
jamed said:
Hey thanks for the great write up, I wasn't familiar with the new GA plugin. I installed and was wondering if there was any other way of going back further in the past other than 3 days??
Jamedy
http://www.academyX.com
Sal Uryasev said:
Hey Indurango and Jamed,
The current version does not have that option, but I plan to add it into the next incarnation of the extension. The only way to get at a different number is to go back to the older Greasemonkey version mentioned at the top of this post. The Greasemonkey version has an option for changing the 3 days to a different number.
-Sal
Tobias said:
Nice plugin. If it could also change the Analytics report to display the complete referrer path right away instead of having to click on the domain it would rock. :)
Edwin said:
How can I return results for non-paid keywords only? When I try to select them, this add-on still shows the cpc keywords in the results as well.
Sunaina said:
Hi,
I just added the plugin and I see the "Who sent me unusual traffic button" on the said pages. But I don't understand where to spot the information the plugin is supposed to provide. I dont see anything as shown in the screenshots above and my data doesn't look very different. Please advise.
Bernardo Contopoulos said:
Hi Sal.
Thank you for the plugin. I was wondering though why it shows three exact same buttons on the interface of my analytics. However, only one works (clickable).
Tim said:
Hi,
Great idea for a plugin, this will be really useful, thanks very much for making it available.
It seems to work properly for me, but I have a question on how the calculation is made - could you let me know exactly what is meant by '50% higher/lower traffic over the last 7 days'?
I have looked at some of the keywords in the list it brings up and have compared their visits for the past 7 days with the 7 days prior and found the change to be less than 50%. Am I misunderstanding the calculation?
Many thanks,
Tim.
John said:
Love the plugin. Is there a way to get the data for the date range in analytics rather than 3 or 7 days depending on the report?
Thanks,
John.
James said:
I click the button, the page blinks (button says 'loading') but then the data disappears and its back to the same page again.
Is something supposed to stay on the screen? I'm using the latest version of Firefox...soooooo..
Dave said:
tried the plugin, did not work.
Sandra said:
Unfortunately the plugin is not working for me. After I click the button it just displays a 'Loading' sign, but doesn't load.
Ben said:
Is there a version that's compatible with FF 3.5.2?
Brent said:
Hi,
I'm on FF 3.5.2 and the plugin doesn't seem to be working. Anyone else having issues, or am I having isolated problems?
Richard said:
work for me people, ff 3.5.2!
just logon Analytics and click on button "who send me unusual traffic?" and poof! have fun
Brent said:
hmmm yeah, definitely not working for me on FF 3.5.2 after a few separate installs/uninstalls. It must have a conflict with one of my previously installed addons.
Brent said:
oh jeez... i'm a n00b. for everyone else out there, who like me, thought the button would look the same/be in the same place, it is actually at the top of the page now - right in between the "email" and "add to dashboard" buttons - it's not in the same place it used to be! So, I was incorrect that this wasn't working in FF 3.5.2 - it is I that is not functioning correctly :P
Mel said:
Doesn't work for me. Didn't work for me before when it required Greasemonkey either. FF 3.5.2 Cookies are enabled.
angela said:
Lovely plug-in. Well, when it works. It installed fine on my 5-year-old XP laptop. But on my 64-bit Vista, it ACTED like it was installing fine but I never see the "who sent me unusual traffic" button.
I'm using FF 3.5.3. Any known issues? Should I play around with removing other plug-ins?
Debbie said:
Isn't working for me either. I have Firefox 3.0.14. I have the button but it doesn't seem to do anything.
Dan said:
Doesn't seem to work for me either. Are there known conflict with FF 3.5.3 or maybe even compatibility issues with Better GA plugin?
Debbie said:
Yes, definitely a compatibility issue with Better GA plugin. I had the same problem and just disabled the Better GA plugin and now it works fine.
Phil said:
I'm a bit confused....It says "Referring sites with 50% higher traffic over the past 3 days." What is the baseline for the calculation? 50% higher than when? Does it look at the average amount of traffic referred going back forever? And then look at the current time frame selected in GA and look at the difference?
e.g. If google usually sends my site 1,000 visits a day but sent my site 1,500 visits on Tuesday 11/17 (yesterday). Is that the 50% increase?
What if I want to analyze traffic from a month ago?
Mark said:
Not compatible with FF 3.5
Lee said:
sooo why the heck doesn't GA do this out of the box??
wa said:
please update the plugin for ffox 3.6
mariusz said:
please update to the newest firefox - this plugin is simply brilliant
AJ Baer said:
Another request to update for ffox 3.6. This looks like a great plug-in.
Burak Tansug said:
Hi,
This is a great plug-in, but I could not find the updated version for Firefox 3.6.
Maksym said:
This is unavailable for Firefox 3.6.2. Update it please
Nikos Kapsomenakis said:
I would also like to ask you to update this great add on for newer versions of Firefox
ChrisM said:
Please add for 3.6.2. Can't wait to use.
Tarvinder Gill said:
I had firefox 3.6.2, then downgraded to an older version of firefox to get the plug-in to work.






2 comments
Toby Murdock said:
really cool.
congrats zach & team. :-)
Dirnov said:
Amazing! Not clear for me, how offen you updating your www.juiceanalytics.com.
Dirnov
said:
Add a comment