matomo icon indicating copy to clipboard operation
matomo copied to clipboard

[Bug] wrong URL aggregation

Open tassoman opened this issue 1 year ago • 5 comments

What happened?

We got visits to this kind of pages

Path Views
/page/name 34
/page/name? 1
/page/name?????? 1
/page/name???????????? 1

What should happen?

as user, I want to see all rows aggregated, without specifying a GET key-value for aggregation

Path Views
/page/name 37

How can this be reproduced?

  1. Log visits to wrong URLs having plenty of ?????? as Query String.
  2. Generate Page View reports
  3. See different rows inside the report, even if is displaying "aggregated" paths (not flattered)

Matomo version

4.14.1

PHP version

8.1

Server operating system

CentOS

What browsers are you seeing the problem on?

Firefox

Computer operating system

Windows

Relevant log output

No response

Validations

tassoman avatar Jul 17 '24 10:07 tassoman

@tassoman Sorry for the late feedback on this one. This sounds like an edge case and I'm not sure if that is something we would change/implement anytime soon.

As a workaround I would suggest to implement some javascript into your tracking code to manipulate the tracked URL and remove such addition ? already before tracking.

sgiehl avatar Aug 21 '24 13:08 sgiehl

Maybe we can set a filtered regex rule, ignoring query strings having more than one question marks. In website configuration.

We have no direct control of JS trackers.

tassoman avatar Aug 21 '24 14:08 tassoman

@tassoman have you set a filtered regex rule as per your last comment?

des-innocraft avatar Sep 11 '24 00:09 des-innocraft

Hello @des-innocraft I didnt tested yet. I'm not sure measurable option Query Parameter will include values outside the parameter keys in the url.

Let's assume this URL https://example.com/my/page/subpage??????parameter=value.

By setting Regex Query Parameter filter value as: /.+/ every parameter will be ignored. Also writing otherParameter will exclude exactly that parameter key. I'm not sure for question marks, they aren't really parameters. Regular expression should be: /\?{2,}/

I'm going to test if it's possible to catch them.

tassoman avatar Sep 17 '24 16:09 tassoman

Ok. Shortly, I put /\?{2,}/ as global Query Parameter filter, but nothing happened. Was wrongly logged.

immagine

tassoman avatar Sep 17 '24 16:09 tassoman