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

IP filters for 340+ unique IP's

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

I've been trying, and failing to determine how I can filter 340+ unique IP addresses from a view. Any suggestions would be great, in short the use is for a restaurant chain.

 

Thank you!

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Richard D
January 2017

IP filters for 340+ unique IP's

Top Contributor
# 5
Top Contributor

Hi :-)
There are a few ways this could be done..

 

the easiest -
Create a custom dimension in the GA Interface

Info here on how to do that.. 
https://support.google.com/analytics/answer/2709829?hl=en#set_up_custom_dimensions

I would name it something like Exclude Wifi
and give it a scope of User (since they are only required to do the TOS on first access)
User scope will apply the value to current and all future sessions until such times as they clear their cookies.. or they come back using a different device that doesnt have the ga cookie set


in the form's tag..using onsubmit an event could be configured to also push thru the Custom dimension.

If there are no other custom dimensions created then the first one should be dimension1

 

for example -
<form onsubmit="ga('send', 'event', 'wifi terms', 'submit accept', { 'dimension1': 'yes' });">

You can then create a new View and create a custom exclude filter using the dimension as the field to filter and yes as the value to exclude.

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

View solution in original post

IP filters for 340+ unique IP's

Top Contributor
# 2
Top Contributor

Hi :-)

Filters wont work on historical data already collected within a View.

Is it employees or similar that you are trying to filter out?
Do they require some sort of login when accessing the particular website?
If so, then you may want to consider applying a custom dimension at the user level for those users, then the custom dimension could be used for filtering rather than umpteen different IP addresses (which may not be static and possibly change over time).

 

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

IP filters for 340+ unique IP's

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Bronwyn! Thank you for the quick reply.

 

I am trying to filter out visitors from free restaurant Wifi IPs. No log in required, a simple terms and conditions on their first access along with a form that gather's name, email etc.

 

 

 

IP filters for 340+ unique IP's

[ Edited ]
Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆

Hi @Richard D,

You can use regex to exclude IPs in view filters.
For Ex: 120\.100\.100\.[1-9][0-9]?      (simple use case)
would exclude 120.100.100.1, 120.100.100.2, ......120.100.100.99  (99 IPs)

You'll have to deduce some logic(regex) to exclude your 340+ IPs.( this part would be complex)
You can some examples here to exclude complex IP combination:
https://support.google.com/analytics/answer/1034840?hl=en

or Best way would be to try as @Bronwyn V suggested.   

Hope this helps.
Thanks,
Ritwik

Marked as Best Answer.
Solution
Accepted by topic author Richard D
January 2017

IP filters for 340+ unique IP's

Top Contributor
# 5
Top Contributor

Hi :-)
There are a few ways this could be done..

 

the easiest -
Create a custom dimension in the GA Interface

Info here on how to do that.. 
https://support.google.com/analytics/answer/2709829?hl=en#set_up_custom_dimensions

I would name it something like Exclude Wifi
and give it a scope of User (since they are only required to do the TOS on first access)
User scope will apply the value to current and all future sessions until such times as they clear their cookies.. or they come back using a different device that doesnt have the ga cookie set


in the form's tag..using onsubmit an event could be configured to also push thru the Custom dimension.

If there are no other custom dimensions created then the first one should be dimension1

 

for example -
<form onsubmit="ga('send', 'event', 'wifi terms', 'submit accept', { 'dimension1': 'yes' });">

You can then create a new View and create a custom exclude filter using the dimension as the field to filter and yes as the value to exclude.

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

IP filters for 340+ unique IP's

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Hi Ritwik - thank you for sharing your knowledge! I took the regex steps and added a handful of filters that constituted the IPs and it definitely is working! Thanks again.

 

Additionally I used Bronwyn's cookie solution as well, just incase those IPs do change, which does happen often, especially when new restaurants are added.

IP filters for 340+ unique IP's

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Hi Bronwyn, thank you for the detailed reply!

 

I have (hopefully correctly) implemented this custom dimension filter, in addition to Ritwik's regex filter solution I think I have all the bases covered.

 

Thanks again!