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.83k stars 2.64k forks source link

Event report doesn't aggregate within category/action if there are many event 'name' values #20746

Open samjf opened 1 year ago

samjf commented 1 year ago

The event report found in Behavior > Events does not correctly aggregate the count of events if there are too many event names. This is evident on certain reports Category/Action evolutions which suddenly have a drop in events for no reason. Upon investigation in the database it was found these records had been 'wrapped' into the other without having their values aggregated in the category and action levels of the drill down. This causes somewhat unreliable reports which are dependent on having the total name values less than 50001 to have an accurate report of actions and category counts.

My current understanding of what occurs is as follows:

This is wrapped into other without any regard to if the Category or action will be visible in the report which essentially removes the event aggregation of those events.

Context

This was evident in the archiving of a large Matomo instance that collects many events. The events have a somewhat unique event name which means they don't necessarily re-occur often.

Expected Behavior

Event category and event action evolution should show the aggregated totals for visits each day without being affected by large amount of events.

Current Behavior

The evolution of both category and action can be seen to have a significant drop when a large amount of events have been recorded.

Possible Solution

Steps to Reproduce (for Bugs)

  1. Track a large amount of events so that the amount of records exceed the configured archiving_ranking_query_row_limit
  2. Ensure the subject Event Category/Action has enough visits to a certain event name to be within the displayed within the table as a named row.
  3. Ensure the subject Event Category/Action has event names which have a low visit count so that they are beyond the archiving_ranking_query_row_limit count when sorted.
  4. Observe that the summation of the vists do not include the records from step 3.

Your Environment

bx80 commented 1 year ago

Thanks for an excellent write up @samjf :+1:

Refs: L3-440