AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

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

Filter out specific referring URLs with regex

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm trying to exclude URLs like these:

 

/share4x/index.e18853ff16b30131c857d1a4c3816e85.html
/share4x/index.8b80d8d9046d002f5c79f52c9a27d602.html

I tried a number of reg expressions, including the one below, and they aren't working. 

(\/share4x.+)

Any suggestions?

Filter out specific referring URLs with regex

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

\/share4x\/index\.[a-z0-9]{32}\.html

i'm presuming there're 32 such characters between index. and .html

 

Otherwise: \/share4x\/index\.[a-z0-9]+.html

which assumes one or more number characters in-between

Filter out specific referring URLs with regex

Participant ✭ ✭ ☆
# 3
Participant ✭ ✭ ☆

Use "Campaign referral path" instead of "Referral" when you configure your filter.

And you can use /share4x/ or /share4x/.*html as a regex.

Slash sign "/" doesn't have any special meaning so there is no need to put backslash sign before it.