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

Stripping/Rewriting URLs Parameters with RegEx

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



I would have two questions I am currently battling with and hope someone could give me some pointers.


1.) I have URLs in Google Analytics that get reported individually in the reports because each has a unique set of letters and numbers appended to the end of them, e.g.: 




Normally I would exclude query parameters via Google Analytics by putting them in the 'Exclude URL Query Parameters' box in the view settings, but as the above URL does not have any parameter in it, just a unique set of letters and numbers, I do not know how to exclude this. Would a filter be able to do this? I am not overly familiar with regular expressions.


2.) Another issue I am facing is that there is a URL query parameter in the middle of a URL (Login?ReturnUrl=), which I would like to strip, e.g.: 




Google Analytic's URL Query Parameter exclusion box doesn't seem to work in this instance either. In addition, I don't know how to strip the 'Security' bit from these URLs whenever the Login?ReturnUrl= appears in the middle of the URL, but not when the word appears on its own, e.g.: /Security/ForgotPassword.


Any help would be appreciated.


Thanks in advance.

Stripping/Rewriting URLs Parameters with RegEx

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆

I have a similar problem with language parameters in the beginning of the URI, which I would like to have removed in one view. 





Changed to /Technical-Service/Service-Engineers


I have tried and failed to create an advanced filter to achieve this. 


It seems like I am trying to do the same as OP in this thread.