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

Excluding multiple IP addresses with regular expression

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'd like to exclude specific IP addresses and the regex isn't working. The regex (with dummy data) is below. Any suggestions? 

 

99\.999\.99\.999|888\.88\.888\.888|77\.777\.77\.7
1 Expert replyverified_user

Excluding multiple IP addresses with regular expression

Top Contributor
# 2
Top Contributor

Hi, Michalene B,

 

That regex should work. How are you confirming that it isn't working? Are you sure are filtering the correct IP addresses? Google can only filter public IPs, not private ones. For example, if you google "myip", it will give you the public facing address, and this is what you need to filter by.

 

Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

Excluding multiple IP addresses with regular expression

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Nicky,

 

I used Google's recommendation to test it: https://support.google.com/analytics/answer/1034840?hl=en.

 

I tested once using only my IP address and the results were correct (my IP address was excluded) and I tested another time with the regex, which includes my IP address, and it didn't work.

 

Excluding multiple IP addresses with regular expression

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

I agree with Nicky. Nothing wrong with the regex. I use this all the time in GA and it works.

 

I'd suggest maybe review/change the method of testing?