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!
The calculation of some metrics for action custom dimensions was not correct.
We used to fetch all metrics grouped by custom dimension value and url to be able to directly fill the subtable reports.
The main report was then created by aggregating the subtable values.
This results in incorrect numbers, as e.g. metrics like nb_visits or nb_uniq_visitors can't be simply summed up. They need to be fetched separately from the database.
This PR changes the archiving, so it uses two queries. One to fetch the metrics for the main report (grouped by custom dimension value only) and another query to fetch the data for subtable reports (grouped by custom dimension value and url).
[ ] Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
[ ] Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
Description:
The calculation of some metrics for action custom dimensions was not correct.
We used to fetch all metrics grouped by custom dimension value and url to be able to directly fill the subtable reports. The main report was then created by aggregating the subtable values.
This results in incorrect numbers, as e.g. metrics like
nb_visits
ornb_uniq_visitors
can't be simply summed up. They need to be fetched separately from the database.This PR changes the archiving, so it uses two queries. One to fetch the metrics for the main report (grouped by custom dimension value only) and another query to fetch the data for subtable reports (grouped by custom dimension value and url).
fixes #19164
Review