Group hierarchical by query string PIWIK/MATOMO

0

I’m facing with a problem,

My website is being tracked by Piwik(/Matomo), under Actions -> Pages, There is a weird thing.

There are some pages which grouped by the same url name, and other not.

I’ll explain with an example.

Example 1. Aggregated well

https://www.example.com/Out#A https://www.example.com/Out#B

It results an aggregated 2 visits of https://www.example.com/Out -> Then I can expand it. (there is a small plus icon)

Example 2. Not aggregated

https://www.example.com/Out?mId=1 https://www.example.com/Out?mId=2

It results 2 flat lines without being aggregated.

Example 3. Aggregated well

https://www.example.com/Out/In?mId=1 https://www.example.com/Out/In?mId=2

It results an aggregated 2 visits of https://www.example.com/Out -> Then I can expand it. (there is a small plus icon)

How can I make example 2 work like example 1 and 3?