The mission statement of Matomo (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. »
« Open APIs: » It is very important for us that Matomo’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 Matomo.
Matomo 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 Matomo 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!