The best API for web analytics
The mission statement of Piwik is « To create, as a community, the leading international open source web analytics application, providing access to all functionality through open components and open APIs. »
The keyword here is “open APIs“. It is very important for us that Piwik’s users can access their data very easily. The problem with a service such as Google Analytics is that you don’t own your data, you can only access it through the limited user interface the service provides. During the last weeks we’ve worked hard to implement and finalize the API concept in Piwik.
Piwik APIs makes it easy to get:
- the search engines keywords used during the last week
- the top 5 browsers of the current year
- the top 10 pages of your website that contain the string “blog”, ordered by number of visits ascending
- the list of the websites registered in Piwik or the list of users that have an admin access on the website no 4
- and a lot more!
I’ve added a tutorial “How to get the top 10 keywords of yesterday in XML?” It’s as simple as this url. Of course with PHP or any other langage you can very easily print out the result with the colors/fonts you want (see an example on this page and the example source code). You can request the data in XML / JSON / PHP / CSV / as a RSS feed / HTML.
See the full documentation on the API reference page. Many examples are provided.
With the API you can build widgets, display your web statistics in your blog sidebar, access piwik data from any other dashboard, etc.
If you have examples of people using the APIs leave a comment. Happy coding!
This entry was posted on Friday, January 18th, 2008 ; category Development, Documentation ; RSS comments.
March 26th, 2008 at 5:12 pm
I demoed the piwik site and liked what I saw.
I downloaded and Installed, Super easy! nice.
Statistics aren’t displaying, however, and I need some help.
thanks,
Brian
March 26th, 2008 at 6:00 pm
Brian, I guess you have to select today’s statistics in the calendar. By default yesterday’s statistics are displayed.
April 12th, 2008 at 11:57 am
Hi
Piwik looks very interesting. I just tried out the demo you have installed and am currently downloading on my server.
I am really interested in using the API do have statistics for say a few pages. So I can do something like statistics for a page http://muziboo.com/member/prateek and provide these statistics to members of my website.
I will drop in a line once I have something ready … I am assuming its possible to do it :)
April 18th, 2008 at 7:07 pm
What this tool (and phpMyVisites) needs to lift off is a funnel|scenario|leaking bucket plug-in. Google Analytics have got got it as all the other commercial available tools, like Webtrends, WebIndexTools and others. Alas I’m not the developer to construct it, but in essence it takes a number of preset pages and tracks visitor actions; the ones that goes through every anticipated step, the ones that declines and spill of (to where) and the ones that enters into different levels of the funnel from unspecified pages (what are they). The absence of question marks are intentional. Without this it remains a toy. //All respect to the developers that’ve brought it this far.//
April 24th, 2008 at 1:12 am
Pos, we do agree that Piwik is not yet an alternative in GA for some user as it doesn’t provide the advanced analytics features. We however believe that the current Piwik architecture makes it possible to add these features. We are looking for developers willing to work on piwik to make these possible. We would be happy to help on functional spec, design decisions, etc. :)
May 7th, 2008 at 8:25 pm
Just installed piwik. Have a question, without having to be constantly logged in, how do I block traffic from being saved?