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
5.6K members online now
5.6K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

How to filter Subnet IP

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi guys

I need to create a dedicate filter that will include only traffic from my client office , the problem is that the office network is working on Subnet IP, that begens with , 192.168 and could end with endless number.

I tried to use the "begin with", and some regex like  /192.168[.\d/]*/g but didn't hove any luck.

Thanks

Eyal

 

2 Expert replyverified_user

Re: How to filter Subnet IP

Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭
Hi Eyal.

Try this 192\.168\.1\.[1-9]|168\.25\.25\.1 once hope it will work then you can check in real time data.

Thanks

Re: How to filter Subnet IP

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
didn't work

Re: How to filter Subnet IP

Top Contributor
# 4
Top Contributor
Hi,

Please try the regex below.

^192\.168\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: How to filter Subnet IP

Top Contributor
# 5
Top Contributor
Hi, Eyal b,

You've already got some good support to your question, but I saw your problem mentioned before and just wanted to point out this resource: https://support.google.com/analytics/answer/1034840?hl=en ("Exclude a subnet of IP addresses").

Hopefully you will resolve your issue!
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