Return number of all visits over all time

(rlesterphx) #1

I have a page that displays links to other pages that are tracked with Piwik. Everything is hooked up and working.

Next to each link I want to have the total number of views, from all time, displayed (via PHP).

What type of query URL should I use? I have something like this right now:

Which returns an array like this:

I could add each years’ value together to get the total number, but isn’t there an easier way to do this?



Same for me… how i can obtain total visits? :confused:

(Matthieu Aubry) #3

You can use period=range&date=2008-01-01,today for example


Oh thanks, this works fine (but only in API, not in widget) :slight_smile:
I’ve starting today with stats, then i can use: period=range&date=2011-11-11,today (special date) :wink:

Just another info: how i can try to manual increment with old value from my old stats server (phpstats)?
Maybe i can edit a value in db and insert old parameters (just to maintain a full counter)? :slight_smile: