matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.67k stars 2.62k forks source link

Discrepancies noticed within the performance report #19729

Open Chardonneaur opened 2 years ago

Chardonneaur commented 2 years ago

Hi guys,

A client of mine reported me the following issue, the total of the performance report for a given month on the bar graph is different than the one of the table shown below it. hidden Did anyone else already saw a similar issue?

sgiehl commented 2 years ago

Hey @Chardonneaur This could maybe be rounding issues. The bar evolution chart simply displays a sum of all average metrics, while the average load time metric is calculated on a per visit base, summed up and divided through the number of visits.

MatomoForumNotifications commented 2 years ago

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/average-page-load-time-incoherence/47384/2

Chardonneaur commented 1 year ago

@sgiehl I tried to test the rounding hypothesis and to me it is not because the difference is too high. Is there any possibility to check the calculation that Matomo is doing to perform the total of this table report?

heurteph-ei commented 1 year ago

@sgiehl, I agree @Chardonneaur, even with rounding, you can't have such difference. On the tooltip, the rounding is acceptable (and not visible): 0.2 + 1.0 + 0.08+0.93+1.09+0=3.30, on the KPI, it is not. with approximations, the maximum gap should be 0.06 (in the screenshot the difference is 0.51s, or 15%, what a huge difference!)

sgiehl commented 1 year ago

Those are some sort of rounding and calculation issues. Each single performance metric is calculated by using the sum over all actions, having the metric set, divided through the count of actions. But the overall metric is computed by summing all metrics over all actions, where one of those metrics have a value, divided through the actions. So in theory there can be actions, that e.g. only have a transport time set. Those would then also be used for the overall metric, but would lower it's value bit more, as other metrics aren't set. Hope that makes sense. If not I might need to explain that a bit more in detail.

heurteph-ei commented 1 year ago

I think that on the same page (see Chardonneaur screenshot), you should not have 2 different values for the same thing: image image All values are the same, except Total...

Chardonneaur commented 1 year ago

@sgiehl @heurteph-ei thank you very much for taking the time investing in this issue, I think it is really important that an answer can be provided to the community in an FAQ or similar as the question will come on and on.

sgiehl commented 1 year ago

@heurteph-ei @Chardonneaur I agree that there shouldn't be two different values. I guess we actually should change the calculation of the value used for the sparkline. Otherwise it might be a bit strange that the total page load time isn't the sum of all other metrics. 🤔

MatomoForumNotifications commented 2 days ago

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/possible-error-in-performance-statistic-page/59672/2