analyticsapi_20080118.jpg

It’s too bad that Google Analytics doesn’t have an official API, but Chris Riley came up with a fun solution for pushing analytics content into a format that is easily accessible from your web applications.

Using Google Analytics’ scheduled reporting feature, you can have an analytics report automatically sent to a public, read-only Google Group in XML format. From there, the group’s latest post can be pulled in through Yahoo pipes where it is filtered and exposed as a JSON service, ready for you to pull into a web application via Javascript. Yoikes!

Chris’ example shows you how to do this to add a popular posts feature to your blog. You should be able to tweak the code to export other information from Analytics as well, including geographic distribution, popular search terms, or even visitor and pageview data.

No Google Analytics API? No Problem! – Link