Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Period reports must always or never include today's statistics #5793

Closed
mattab opened this issue Oct 8, 2008 · 6 comments
Closed

Period reports must always or never include today's statistics #5793

mattab opened this issue Oct 8, 2008 · 6 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Oct 8, 2008

Reports for weeks, months and year do not include the most recent “today” data. Reports for weeks/month/year are only processed once per day, therefore are not ‘real time’ as such. This was done for performance optimization in the first place.

more info from Anton: I researched on this problem little more and I found real bug in the logic. Follow instructions below and you will see where the problem is:
1. Setup always_archive_data = false
2. Create new html page, add it as new site to Piwik and put JavaScript code to the page. DO NOT query for statistics for this site (actually it is only 1 page)
3. Make some visits from different browsers and/or machines.
4. Query for last day, then last week, month and for last year. You will see the same numbers for visits, actions etc. We are expecting weekly, monthly and yearly statistics do not include today’s statistics. BUG.

Actually Piwik can’t find archive built for last week, and it build it including today’s visits. So Piwik does not follow the same logic. See next…
1. Now you have all archives built. Try to make some more visits and query for last day, week, month and year again. You will see new visits in the last day, but you will not see them in last month and year, but you will see it for last week! So it is totally confusing. Now Piwik does not include new visits from today (just like you said in your previous message). But it does it if no archives built in the past.

P.S. If you set always_archive_data = true and ask Piwik for visits for last day, week, month and year again – it will be ok including all today’s visits.

So Piwik does not follow your logic described in the previous letter. It seems that the logic is that Piwik checks whether archive is built already and simply does not rebuild it.

It must NEVER include today’s statistics… or ALWAYS include today’s statistics. We can also contemplate a config file boolean setting include_today_statistics_in_period_archives

@mattab
Copy link
Member Author

mattab commented Oct 10, 2008

Could replicate on this piwik server [red-sea](http://divezone.net/red-sea.htm) and other pages…

@anonymous-matomo-user
Copy link

...so? Is it possible correct this bur or not ? I don't understand if it is "better" with this problem

@mattab
Copy link
Member Author

mattab commented Nov 16, 2010

It is not 'better', just more performant as monthly/weekly archives are processed only once per day.

@mattab
Copy link
Member Author

mattab commented Mar 13, 2011

There are so many messages of confusion about this in the forums over the months. It could be good to at least let the users know, what exactly is included in the report (even if we don't implement the full ticket yet).

the message is displayed when viewing "this current" week, month or year. It could say "This report does not include data between 4AM and 6:30pm today. "

@mattab
Copy link
Member Author

mattab commented Apr 5, 2011

OK about time to tackle this one

@mattab
Copy link
Member Author

mattab commented Apr 6, 2011

(In [4341]) Fixes #5793 it was really not that hard, I wonder why I postponed it for 2 years...
so now, any report that "contain" today, current week/month or date range containing today, will be processed every N seconds, N being the timeout set in General Settings
however if a report is requested for 'current month' eg., and archiving via browser is disabled, we will select 'any current month' archive that was processed today. So we might display out of date reports, ie. the oldest behavior, if archiving is disabled and crontab doesn't run as often as the timeout set in GEneral settings

@mattab mattab added this to the Piwik 1.3 milestone Jul 8, 2014
@mattab mattab self-assigned this Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants