[Piwik-hackers] API: querying data for last X

Matthieu Aubry matthieu.aubry at gmail.com
Wed Jun 4 03:03:17 CEST 2008


(In the future please post a new message for each distinct question)

This is the behaviour for piwik archives: period statistics (week / 
month / year statistics) do *not* include today's statistics.
It would be incorrect as today's stats are never up to date. This is 
also for performance reasons (we have to compute these reports only once 
a day).

There could be an option "include_today_statistics_in_period_archives" 
but I'm not sure about the value here.

Anton Andrievskij wrote:
> When I query for last 2 weeks (or last 2 days) - I get today's visits:
> http://mysite.com/piwik/?module=API&method=VisitsSummary.get&idSite=2&period= 
> <http://mysite.com/piwik/?module=API&method=VisitsSummary.get&idSite=2&period=>*week*&date=last2&format=xml
>
> But if I get for last 2 months (or last 2 years) - I do not get 
> today's visits:
> http://mysite.com/piwik/?module=API&method=VisitsSummary.get&idSite=2&period= 
> <http://mysite.com/piwik/?module=API&method=VisitsSummary.get&idSite=2&period=>*month*&date=last2&format=xml
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.piwik.org/pipermail/piwik-hackers/attachments/20080604/62664db3/attachment-0001.htm 


More information about the Piwik-hackers mailing list