-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Statistics relative to previous period are misleading #1650
Comments
thanks for reporting @RealOrangeOne! yes, this is correct for the "today" view. there's a thread on this here #344 |
Hey ho 👋 I just had a quick conversation with @ukutaht about contributing to Plausible, and I feel that this is an excellent first issue for me to get my feet wet. Therefore, I'll start tackling this (probably this weekend) unless somebody else has already started with it. BTW feel free to assign it to me if you want. Cheers, |
oh that's nice to hear @ccmaris! would be a great improvement to Plausible to standardize comparisons so they're compared to exact same amount of time. thanks for your contribution! |
Hey there 👋
Which solution would you guys prefer? |
You're right, it's quite a bit trickier than I initially thought. I'm leaning towards option 2 because:
I think adding another clause here that limits the query to the current hour of the day (when period=day) would be the most minimal change. As long as there's a test case for it I'm not worried about the error-proneness. We may need to rethink the |
I had a look and think that this is tackled now ?! |
@ukutaht In
|
Sorry no, I don't think this will work. I think we need to add another case to to the analytics/lib/plausible/stats/query.ex Line 36 in 2a4061d
We already adjust the previous period for month and year ranges to make sure they only include a comparable time period from the previous one. Another clause needs to be added for the |
Ah I see, that makes sense. The |
Past Issues Searched
Issue is a Bug Report
Describe the bug
On the dashboard, under "Unique visitors", is a percentage showing how today's numbers compare to yesterday's.
Unfortunately, it seems these are based on the entire stats of the previous day, rather than just those at the current time. At least, I think that's the case.
Expected behavior
These "previous period" statistics take into account how far through the current period we are.
For example, when looking at the "Day" statistics, and it's 4pm, it should only consider stats for yesterday up to 4pm, so the data is actually comparable.
Otherwise, the values aren't exceptionally useful unless going through extreme growth / decline in traffic.
Screenshots
Environment
The text was updated successfully, but these errors were encountered: