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

Stripping/Rewriting URLs Parameters with RegEx

[ Edited ]
P K
Visitor ✭ ✭ ✭
# 1
P K
Visitor ✭ ✭ ✭

Hi,

 

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.: 

/ManageAccounts/AccountDetail/AccountSettings/NJTeAi9fqXuenZJVkLR7YxGNUeD2Sub54

/ManageAccounts/AccountDetail/AdditionalServices/Gg8zI7q3-cvtE-Jr55cizFvDwfdvzAf55

 

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.: 

/Security/Login?ReturnUrl=/Account/Overview
/Security/Login?ReturnUrl=/ManageAccounts/AccountSummary

/?ReturnUrl=/ManageAccounts/AccountDetail?tab=AccountSettings

 

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. 

 

Ex:

 

/ja-JP/Technical-Service/Service-Engineers
/en/Technical-Service/Service-Engineers

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.