Display total of visit


#1

Hi,

I would like to display on my site, total hits since opening the web-site. And I have not found in Widgets.

Just the number and not a big block, eg 154 264 visits

Sorry for my bad english and thanks in advance !


#2

Have a look at the Piwik API section “Module VisitsSummary” method “VisitsSummary.getVisits (idSite, period, date, segment = ‘’)”


#3

Thanks, but I do not know how to use APIs :frowning:

I’ve found this:

http://taspas1po.fr/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=today&format=xml&token_auth=xxx

Second question: I tried to change the date Today by “all” but it’s incorrect.
I found nothing on: PHP: strtotime - Manual


#4

You could use the date range option to get total tracked visits:
E.g.: http://taspas1po.fr/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=range&date=2001-01-01,today&format=xml&token_auth=xxx

This will get you all visits from 2001-01-01 until today.

Have a look at the API reference http://piwik.org/docs/analytics-api/reference/ for all possible parameters.

@matt: Perhaps the possibility to use date ranges should also be added to http://piwik.org/docs/analytics-api/tutorials-examples/#toc-build-the-url


(Matthieu Aubry) #5

Thanks for the suggestion I added a quick note in http://piwik.org/docs/analytics-api/tutorials-examples/


(Eduardo Contreras) #6

I would like to see an example with the new API. Im pretty lost even with these good examples since now we need updated documentation.

Thanks a lot for the guides.