Jul
02
Web analytics API
I’m currently investigating the available web analytics API, to see how they are designed, and what features they offer.
Here is a listing of the Web statistics APIs I found, along with their documentation page:
- Piwik web analytics API tutorial and full API reference (more than 50 methods)
- W3Counter - Web Stats API
- Help with Clicky | Clicky
- Chapter 3. The phpOpenTracker API
- FeedBurner - Awareness API Reference
- PHP API - TraceWatch Web Stats
- ClickTracks Professional Client
- ecommstats Web Services API Documentation
- Using the AquaLogic Interaction Analytics 2.0 OpenUsage API
Not really an API but it can still be an interesting read
If you know others web analytics API on the market, please post a comment :-)
I am also gathering interesting links on “how to design & build an API” that I will post here soon.
2 Comments
Make A CommentComments RSS Feed TrackBack URL
















July 3rd, 2007 at 12:40 am
I’m the author of W3Counter and its API. Most of the work of providing the API is done through PHP5’s reflection classes. They provide the ability to inspect the classes that provide W3Counter’s data internally, and easily generate the API reference and documentation from the method names, parameter lists, and phpdoc contained in the class files. As the classes are updated, the documentation updates itself automatically through reflection.
Reflection also does most of the work for transforming an API call into an actual class method call. A search through the class for a matching method name with the right privacy level is all that’s needed. Then, the remaining $_GET variables can be thrown into an array passed as parameters to call_user_func_array() to make the actual call.
Returning the result is relatively automated as well. My internal classes return a custom wcDataSet class which encapsulates the data and several attributes, such as a total result count for paging. One method transforms a data set into an XML block.
Thus, again, the API updates itself whenever a method is added to the class without any additional work.
May 13th, 2008 at 11:01 am
StatsPlugger (Www.statsplugger.com) is an analytics solution that works trough XML.