Analytics
3.7K members online now
3.7K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Filter ALL URL Parameters EXCEPT Predefined List

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

Thanks for taking a look at this!!!

 

Has anyone tried to remove all parameters EXCEPT for a specific list? I've been trying this for days now. I have a site with tons of useless parameters that only get in the way. I want to exclude all those except for what I need.  Plus, the developers could potentially add more at a latter time so I'm starting with what I know I need and maybe add more in later.

 

Also, does anyone know what type of Regex engine Google uses? I found one potential solution that might work but it uses a look back feature, which isn't supported in the JavaScript version. Any guidance would be helpful.

 

Thanks!

Re: Filter ALL URL Parameters EXCEPT Predefined List

Explorer ✭ ☆ ☆
# 2
Explorer ✭ ☆ ☆
I think you need to define 'URL parameters'...

As for the lookback, I'm not sure but you can just test it by creating a report and then adding the RegEx filter to the report. if it works, great

Re: Filter ALL URL Parameters EXCEPT Predefined List

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks for the reply, Dsatino. Someone on Stackoverflow gave me some regex that I am testing now. It worked in my regex testing tool last night. If it works I will post it up here.

Re: Filter ALL URL Parameters EXCEPT Predefined List

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
You were right because you can't use Regex Lookahead or Lookback in GA. That would be a nice feature to have.
Marked as Best Answer.
Solution
Accepted by topic author Eric B
February 2016

Re: Filter ALL URL Parameters EXCEPT Predefined List

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
The solution to this request cannot be accomplished through Filters in GA. You will have to use JavaScript through your tag management system or directly into the code. The solution in code form is here if anyone else needs this same solution:

http://stackoverflow.com/questions/35325597/regex-help-match-any-url-parameter-value-not-in-list