I’m having some problems with archives in Piwik. Piwik seems to be producing incorrect numerics when requesting archives in a month period.
The screenshot belows shows 20 page views and 3 visitors recorded in the last hour (2014-04-04 14:00). These are the only page views in the database.
[attachment 1687 Capture.PNG]
I have a plugin which gets the page views, visitors and unique visitors from the archive.
$archive = Archive::build($idSite, $period, $date); printf("%d\n", $archive->getNumeric(array('nb_actions'))); printf("%d\n", $archive->getNumeric(array('nb_visits'))); printf("%d\n", $archive->getNumeric(array('nb_uniq_visitors')));
When I use the parameters 2, ‘year’, ‘2014-01-01’ I get the following output - which corresponds with that in the Piwik screenshot.
Year for 2014-01-01:
When I use the paramters 2, ‘month’, ‘2014-01-01’, I get the following output - which is clearly not correct - since this data is shown for 4th April in the Piwik screenshot.
Month for 2014-04-01:
The same is similar for the first week of the month April in 2014 - except the output shows 3 visitors, 3 unique visitors and no page views.
Week for 2014-04-01:
Finally for today, the ouput shows 1 visitor and 1 unique visitor, and no page views.
Day for 2014-04-04:
How can this be so inconsistent?