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.64k stars 2.62k forks source link

Add detection of duplicate page view tracking to Alerts #21672

Open 9joshua opened 9 months ago

9joshua commented 9 months ago

At times a user can add script that will cause duplicate tracking of page view or other actions. This can happen, for example, when tracking script is added to GTM or if a Pageview Tag is added to a MTM container when the default tracking script is already tracking page views. It can be some time before the user realises they have tracked twice the number of page views.

Suggest a mechanism that can detect possible duplicate page view tracking as this is the most common type of duplicate tracking, and can cause a large impact on statistics. There could be an option in Alerts to notify users when this is detected.

Possible means for detection:

  1. Pages that rarely have an odd number of page views per visitor
  2. The number of unique page views is less than half that of overall page views for most pages
sgiehl commented 9 months ago

Might be a nice to have feature. But there would be a lot stuff that needs to be defined, so the detection doesn't report too many false-positives. Another possible solution could be trying to implement something within the tracking code. Like when the same tracking request would be sent twice in a row, it would output a warning in the console, but that could be problematic in cases where that happens on purpose.