umami icon indicating copy to clipboard operation
umami copied to clipboard

data-exclude-search="true" not working

Open perkaby opened this issue 7 months ago • 5 comments

Describe the Bug

Hi,

I need to remove tracking URL query parameters and I am using this code:

However any query paramters passed is still recorded in umami, for example going to: https://domain.name?test=something I get a record of ?test=something in the query parameters section.

/Pär

Database

PostgreSQL

Relevant log output


Which Umami version are you using? (if relevant)

2.18.1

Which browser are you using? (if relevant)

Chrome

How are you deploying your application? (if relevant)

Docker

perkaby avatar Jun 04 '25 13:06 perkaby

Is it possible you recorded the query parameter before setting the value? The code is very simple so I can't see what would go wrong. It's just this line here: https://github.com/umami-software/umami/blob/65f3628ed7a5b5840d67cc84ef68afbde7ab1754/src/tracker/index.js#L66

mikecao avatar Jun 04 '25 20:06 mikecao

Hi,

I implemented the code without the settings value and then when I noticed that I need to remove query parameters I added the setting. After the setting was added I have tested with different query parameters and they all seem to be registered. I have verified that the script and the setting is correctly loaded after I added it.

/Pär

perkaby avatar Jun 05 '25 07:06 perkaby

Can you post an example payload?

mikecao avatar Jun 05 '25 19:06 mikecao

Hi,

This is an example payload: {"type":"event","payload":{"website":"website-id","screen":"1800x1169","language":"sv-SE","title":"","hostname":"","url":"https://domain.removed/test.html?testparameter=value123","referrer":"","tag":"test-tag"}}

This is the tracking code used: <script defer src="https://domain.removed/script.js" data-website-id="website-id" data-exclude-search="true" data-tag="test-tag"></script>

Domain and website id has been masked/removed.

This is the recorded info in the query paramters section. Image

perkaby avatar Jun 05 '25 20:06 perkaby

It looks like the query parameters are included in the payload, so there is something wrong on the tracker side and not server side. Will have to do some testing.

mikecao avatar Jun 08 '25 23:06 mikecao

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Aug 08 '25 02:08 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Aug 16 '25 02:08 github-actions[bot]