Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular expression to exclude URL param does not work #13336

Closed
gtmadev opened this issue Aug 22, 2018 · 2 comments
Closed

Regular expression to exclude URL param does not work #13336

gtmadev opened this issue Aug 22, 2018 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@gtmadev
Copy link

gtmadev commented Aug 22, 2018

How to reproduce

The following example assumes a URL like http://www.foo.com/payment/EF123-233444df.
We want to strip away the EF123-233444df parameter, which is the payment ID.

  1. In the "Excluded Parameters" section of site settings, add an exclusion line.
    [^payment/]+$

screenshot_4
(this reg expression does test out fine - see image:

screenshot_2

  1. Navigate to the URL, and then observe the log result. It will still contain the filtered parameter.

screenshot_3

Note: The payment parameters says "3". That is only because my test is different than my example URL stated above. The actual testing URL looks like this: /payment/3

@fdellwing
Copy link
Contributor

This function handles only get parameters.

@Findus23
Copy link
Member

"Excluded Paramters" only applies to URL parameters (as in GET paramters). If you want to modify the URL the best way is to use _paq.push(['setCustomUrl', 'theurl']); to set a custom URL JS-side or write a tracking plugin that applies the change during tracking.

@Findus23 Findus23 added the answered For when a question was asked and we referred to forum or answered it. label May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants