Issue on excluded parameters from URL

Hello,

I’ve configured my website to exclude some query parameters from the url.
Some parameters are excluded but it seems that the first parameter in the URL is not.
Example:
parameter excluded: “aggregation”
URL logged after having exclude the parameter:
https://site.com/#/accounts?aggregation=FOLDER

I can’t reproduce the issue with a classic static html page (without the angular # of the URL) it may be an issue with it ? How can I get pass through it ? (I can’t remove it)

Hi,

The URL https://example.com/#/accounts?aggregation=FOLDER doesn’t contain any URL/GET parameters. Everything after the # is part of the hash and doesn’t belong to the URL (even if your single page application router might act like it is one).

new URLSearchParams("https://example.com/#/accounts?aggregation=FOLDER")
// returns URLSearchParams { }

So you might either want to rewrite the URL with something like
_paq.push(['setCustomUrl', theURLforMatomo]); to remove the part from the URL you don’t want to see or change your URL scheme to use “proper” URLs using the history API.

Hello,

Thank you for your answer!
But if everything after the # is just part of the hash, why some parameters are correctly excluded?
For example if I ignore 2 parameters, the first one in the url does not get excluded but the second one is.

Anyway I’ll tell my end-user to rewrite the url then I think.

Thank you

Hello,
i don’t understood why with my exclusion list : x,y,z. i just had a partial exclusion…

ihave the same issue, when i have https://example.com/#/accounts?x=3&y=4&z=5 , that delete y & z but not x : https://example.com/#/accounts?x=3.

How to configure matomo to exclude the complete exclusion list of my customs parameters ?

Thank you,

Regards

Hello @Lukas ,

I don’t think you answer to me or Mountassar that seems to have the same issue. If the # is just part of the hash, why some parameters are correctly excluded ?