Open RCPrato opened 1 year ago
Hi @RCPrato. Thanks for creating this issue. As far as I know this was actually implemented on purpose this way. But I agree that it should be at least clear in the UI, which period of data you would receive when, after selecting the options.
Maybe it would be helpful to have a small note in the report list for each report that says something like Next report will be sent on xx.xx.xxxx containing the data from xx.xx.xxxx to xx.xx.xxxx
or similar.
Hi @sgiehl i think is more than a UI problem.
Last report, in date 18 july, say:
"Hello, Please find below your day report for [Name Measurables]. [Name custom report] Date range: week July 17 – 23, 2023 Sent from https://matomo....."
I believe it actually sends the data for the week "July 17-23" but since it sends it on July 18, it actually only sends the data for July 17 and 18. Clearly such a setup is useless.
I've had this one on my "to investigate" list for a while, as I played around with scheduled reports for a bit and it wasn't giving me data every week/month. I've had reports that indeed only showed 1 day and I've had reports that showed data for the entire week, and I haven't figured out properly why the difference happens.
I would definitely say Matomo shouldn't provide "future dates" in scheduled reports (as future data is obviously not available). As I asked around, I learned:
@RCPrato Could you:
Update: I just received a report (frequency=daily) with weekly data, see screenshot below. It shows that it's sent on 6 September and shows data for "4-10 September", which equals data for 4-5 September (and perhaps some data from 6 September?)
Now that I'm looking at it, I'm in 2 minds about it:
Overall, I think the first logic is the right one (i.e. I agree with the original description of the issue), but it would be helpful to get some feedback if there's any users that prefer the second logic (and for which reason).
@sgiehl for my understanding, what are the "costs" of implementing this to show "last 7 days"? E.g. is the archiving for a custom range period prior to sending a large CPU performance drag, does it affect storage used per instance, is it easy/difficult to implement, ...?
@Stan-vw Adding a "last 7 days" to those reports should be possible, but would require a couple of adjustments. Currently the reports only store a period (day, week, month, year), this would need to be extended for additional options. Calculating custom range periods in general can always cause issues on bigger instances, but that's actually the same as choosing them in the period selector. So unless range periods are disabled on purpose it should be safe to provide such a feature.
When custom ranges are disabled, this should provide data from previous full week, I think...
Having looked at this again, I’m noticing that in the helptext (see attached) we’ve looked at the logic “sending reports for a single day once a week” but not “sending reports for a week/month every day”, which is probably why this use case isn't working correctly at the moment.
As you can make a daily scheduled report with weekly data, I think @sgiehl's suggestion to make it "last 7 days" through custom range periods sounds reasonable. While we’re at it, we can probably do it for Month and Year as well.
I’m slightly concerned if this will create performance issues or carry significant cost. Any thoughts on this?
In my case, I disabled custom date ranges, then 7 previous days will only have meaning on Monday... If I want my report is sent on Wednesday... What happens?
This issue has been mentioned on Matomo forums. There might be relevant details there:
I would a daily mail with “Pages” report of previous week. For example:
So i set “Email schedule” as “Daily” and “Report period” as “week” because i imagined that for “week” Matomo meant the week that ends on the day that sends the email. But i was wrong…
On report sent by mail, “week” start on the day the mail is sent. So:
It doesn’t make sense… unless Matomo is a seer 🙂