Piwik as a hit counter


Firstly I’d just like to thank you for creating Piwik. I’ve already written a plugin for our CMS which plugs our websites into Piwik – it was sooo simple! I’m now at the stage of writing something to display the data.

I’ve spoken with my boss, and he would like (in addition to the more complex widgets) something which shows the accumulative number of hits per page, since the site was launched. For example:

Home 12 hits
Welcome 32 hits
About Us 64 hits
News 43 hits

I have attempted to retrieve this information using the API - however, I have so far been unsuccessful. For example:

http://example.com/index.php?module=API&method=Actions.getPageUrls&idSite=86&period=month&date=last12&format=html&token_auth=xxxx - pulls the last 12 months worth of data… but does not combine these results.


Appears to work, where 2011-03-01 is the day the site was launched… but I get different results if I change the period to day, month or year… surely, as the results are the total, the period should not matter?

Is there an easy way for me to do this? Any help would be very much appreciated,

Many Thanks,


Please read the API reference: http://piwik.org/docs/analytics-api/reference/

The period defines the range of data, year means this will report for all stats in 2011