Report API - days range across month boundary

Hi there,

I’m doing a lot of work against the reporting API and this morning I noticed some strange behavior on a couple of the APIs.

This is happening on a number of different methods, but this for example:

method=Referrers.getReferrerType&idSite=1&period=range&date=2014-07-01,2014-07-07
Outputs:
[{“label”:“Search Engines”,“nb_visits”:24 … … … }]

When I move the first date in the range back to the last day of the month prior
method=Referrers.getReferrerType&idSite=1&period=range&date=2014-06-30,2014-07-07
Outputs:
[{“label”:“Search Engines”,“nb_visits”:1 … … … }]

The number of visits is less by expanding the range to include another day??

Is my interpretation of what range does incorrect? I assumed it would aggregate that data across all of the days in that range, but for some reason once the range crosses into a previous month it aggregates it incorrectly. This is happening on a number of API methods in this scenario.

Anybody else come across this?

EDIT: After some experimentation it’s only happening on one of two sites I have registered. Id 1. The other site, id 2 is behaving normally… more puzzled by that

Thanks!

Chris

Thanks for report. Are you using 2.4.* ? if not please upgrade and try again.

if you still have issue (for new date ranges to make sure piwik will re-process them), it would be a bug. Can you reproduce on demo.piwik.org ? if so please create a ticket in the issue tracker, we will definitely want to fix this!