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

Excluding IPv4 and IPv6 together.

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello all.  I've successfully created a custom filter to exclude multiple IPv4 from shows up in our Public View.  I'm now in the process of excluding our development team's home IP addresses.  

 

Currently, my exclusion reads something like this:

Exclude Ip Address
^1\.2\.3\.4$|^5\.6\.7\.8$

 

When I need to add a IPv6 to this list, is it as simple as just adding it as it is, or is there a certain syntax to write out IPv6?  Or can it be as simple as this?

^1\.2\.3\.4$|^5\.6\.7\.8$|2001:cdba:0000:0000:0000:0000:3257:9652

 

 

 

Yay?  Nay? 

1 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by topic author Ryan J
July 2016

Re: Excluding IPv4 and IPv6 together.

Rising Star
# 2
Rising Star
Hey Ryan,

You just need to enter the pattern and GA will look for v4 or v6, there is no toggle or radio button (there used to be). It's all contained in the same field.

https://support.google.com/analytics/answer/1034840?hl=en

That said, I personally like to keep one offs or other locations like this in their own filter as it's much easier to update them when they change.

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Excluding IPv4 and IPv6 together.

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
I know how to filter between IPv4 and IPv6, but how do I include them together in the same filter. Since I know filters have hierarchy, I cant just start the first filter with IPv4 and then have a new filter for IPv6

Re: Excluding IPv4 and IPv6 together.

Rising Star
# 4
Rising Star
Hey Ryan,

I don't think you'll have any issue with it in one filter. GA is looking at that field of data (regardless if it's v4 or v6) and comparing it to the value in your pattern.

Filters do cascade but that's really only crucial for include filters or of you are rewriting or combining field values step by step. When excluding hits, you can have multiple filters without issue.

If you want to test your pattern, create a new view or in your testing view, create an include (not exclude) filter that has your pattern combination of v4 and v6 and then check your data in a few days.

I still recommend keeping your in-office exclude filter separate from a home based ip. I do this with multiple locations as it's much easier to update a new public IP for a location then to parse through a few hundred characters of RegEx to find the one you need to update. Smiley Happy

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Excluding IPv4 and IPv6 together.

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Ah, got it. Do I need to do anything to the IPv6 formatting? RegEx it? If so, how?

Re: Excluding IPv4 and IPv6 together.

Rising Star
# 6
Rising Star
Nope! Just add the sting and you should be good to go.

Smiley Happy

-Theo
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn