: Google Analytics, filter ALL but a few URL parameters My sites is being bombarded with new and old URL parameters. At first I tried to add those to the list of excluded URL parameters. With
My sites is being bombarded with new and old URL parameters. At first I tried to add those to the list of excluded URL parameters. With that list now exceeding 200, I wanted to try and use a GA advanced filtern.
However, the only filter I found would exclude ALL parameters:
Create an advanced filter
Filter name: remove all query parameters from URI
Filter type: advanced Filter field A: Request URI Filter
Field A pattern: (.)?(.)
Field B: leave it blank
Output field: Request URI
Output pattern: $A1
Override output: YES Case Sensitive: NO
Source
The only parameters I'd like to not be filteted are query and page.
Does anyone know how to alter the regex accordingly?
More posts by @Cody1181609
1 Comments
Sorted by latest first Latest Oldest Best
Ok, so I was able to to solve my problem.
First I setup a new advanced filter:
Filter name: remove all query parameters from URI except query and page
Filter type: advanced
Filter field A: Request URI Filter
Field A pattern: (.*?)?
Filter field B: Request URI Filter
Field B: ?|&
Output field: Request URI Output pattern: $A1?$B1
Field A required: YES
Field B required: NO
Override output: YES
Case Sensitive: NO
In addition I created a second advanced filter which filters unnecessary ?
at the end of the URL, using the regex
(.*)?$
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.