Date range gives wrong data

I’m currently experiencing the same issue as below.

The topic is from 2012 which makes it weirder that it’s still an issue.
Has this in the past been confirmed as a bug or is there an aspect of using the date picker that i’ve missed somehow? I’ve tried to “Invalidate historical reports” but that didn’t do much.

Any help appreciated

Can you share some screenshots of your dashboard in these different cases?

The scenario is the following:
For a chosen period I want to find data for a specific url. I do this by selecting a date/range/month etc, then I use the search function at the bottom to find my url. This renders different results based on what date range I use which makes it very unreliable.

The image portrays the scenarios in the following order:

  • Specific month: → Data not found!
  • Specific date range: → Data found, however choosing a different might render different result.
  • Specific week range: → No data found
  • Specific day: → Data found

Additionally, I use your API to get data on a day to day and save it to a spreadsheet. The API data gives me data on dates that the dashboard for example doesn’t. For example for the specific article I have data on the 25h of December but this doesn’t show in the dashboard for whatever date combo I use.

How are your data archived?
→ See:

Did you try to invalidate past historical archived data?
→ See:

This is my archive setting.

I’m using the InvalidateReports plugin since last week when I came across the issue. However, it has not changed anything.

As written on the settings, you have to setup a CRON. Did you do that?
If no CRON can be setup, then you should select “Yes” to the above setting…

Thanks Philippe for the quick response and your guidance so for.
I believe we have not done that so I will try to setup a web cron since that’s all I can do right now with my access.

Just so I understand correctly. The implications for selecting “Yes” would make the Matomo Dashboard slower since it would have to process the data on every change?

If your Matomo gathers small amount of hits per day, this won’t slow your server very much…
Also, if the CRON is not activated and the reports are archived when viewed from browser, then they won’t be re-archived for:

  • Past finished (and already archived) periods
  • Archived data not older than the period defined further (900 seconds in your screenshot)

We have multiple sites with monthly visits around 60-70k.

Will the webcron be enough since I want to re-archive past reports? For example I want to re process old reports with –force-periods flag. There doesn’t seem to be a way to pass query parameters with the webcron.
Have I understood that correctly?

If your reports have never been archived (because the CRON was not enabled), then you don’t need to force period, as the archiver should process any report that must be processed…
But I suggest you run this command for the first time when there is small traffic, becaust I think the first archiving of all will take much time :thinking:

Million thanks for all your support today it being a Friday an all :pray:

Tbh, I’m a bit confused at this point. Ultimate question is still, will setting up the cronjob setting properly solve my initial issue with date ranges showing not complete data?

Yes it should:
Standard periods are day, week, month, year.
So for each period, Matomo must archive reports data.
For non-standard periods (eg. from 14th to 27th of December 2021), Matomo will add each standard period it can (in my example the week from 20th to 26th of December, and all other single day) and aggregate for your report at request time… (it can also save some non-standard periods in some cases)

Hey again,
As temporary solution forward I’ve now enabled the archiving setting as I have no possibility to add a cronjob at this moment. I’ve also used the Invalidate archive report plugin for my particular site. At first the loading was a bit slower but not too bad.
However, choosing month, week still doesn’t show the correct data. Should it now be working or have I missed a step?

When you invalidate past data, you have to define the period (period=day/week/month) and also if you cascade the subperiods (cascadeDown=1)
See last point in:

Alright I’ve manage to get one our devs on the task.
He’s run the following command.

1. First we’ve invalidated reports
core:invalidate-report-data --dates=2021-04-01,yesterday --periods=day --sites=3 --cascade --ignore-log-deletion-limit`

2. Then we’ve re-generated reports
core:archive --force-idsites=3 --force-periods=all --force-date-range=2021-04-01,yesterday

This has still not solved the issue. Are these the right commands and procedure?

Short update.
The issue was resolved when we changed our configuration settings. Specifically, any setting related to maximum_rows increased from 5000 and then it worked.

1 Like