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

Enabling Demographics breaks IP address filter

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have been filtering out my staff and my own IP address successfully for years.  Suddenly our own traffic is showing up in the reports.  I did check the IP addresses and they are still current with our filter settings.  What I suspect is that by enabling the Demographics feature the filters are now being ignored.  I then went in and disable Demographics yet it is still tracking our IP addresses in the reports.  Has anyone else had this experience or know if there is a fix?

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Nick D
April 2016

Re: Enabling Demographics breaks IP address filter

Top Contributor
# 9
Top Contributor

Hi Nick :-)
after taking a quick look at the site, the ip filters are not working as expected due to the tracking code having the anonymizeIP function enabled

Copy paste of tracking code from site - 

<!--//--><![CDATA[//><!--
(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,"script","//www.google-analytics.com/analytics.js","ga");ga("create", "UA-XXX7795-8", {"cookieDomain":"auto"});ga("set", "anonymizeIp", true);ga("send", "pageview");
//--><!]]>
</script>

 

use a custom filter instead of predefined, and use a regex with a wild card for the last set of digits

eg 123\.456\.789\.*

 

 

 

 

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

Re: Enabling Demographics breaks IP address filter

Top Contributor
# 2
Top Contributor
Hi :-)
Does your tracking code make use of the anonymizeIP function?
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: Enabling Demographics breaks IP address filter

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
No, it does not. But I don't want to anonymize the traffic. I have a local business so I want to see geographically where my visitors are but I don't want to see my own traffic.

Re: Enabling Demographics breaks IP address filter

[ Edited ]
Top Contributor
# 4
Top Contributor

Hi Nick :-)
I understand that you do not want to anonymize the traffic.
I was asking as use of this function in the tracking code can affect whether IP filters work correctly
Was asking incase it had been added to the tracking code snippet recently :-)

1) How is the Property setup?
Do you have the initial default View (named All Website Data by default) without any filters applied?
and then a Master View with the IP Filter applied to it?
I also usually have a Testing View as well

2) What sort of IP filter are you using? A predefined filter or a custom filter?
Are you able to pls provide a screenshot of the filter settings?

3) Can you please also go to this page and http://test-ipv6.com/ and provide a screenshot of the results/
- Reason i am asking you to this is because in the past, i have had it occur where an ISP has done an update
to the router etc and has accidentally enabled IPV6 instead of IPV4 etc.- which has also messed up IP filters in
analytics.

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

Re: Enabling Demographics breaks IP address filter

[ Edited ]
Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

1/2) (not sure about the difference between the two questions)
I set up the filter by going to the domain in GA, then clicking Admin at the top, then All Filters, Add Filter, Predefined, Exclude - traffic from the IP addresses - that are equal to, then my IP address, and the domain I would like to filter is listed in Selected views.
3) Here is what is says when visit test-ipv6.com:
-No IPv6 address detected.
-Good news! Your current configuration will continue to work as web sites enable IPv6.
-You appear to be able to browse the IPv4 Internet only. You will not be able to reach IPv6-only sites.
-Your DNS server (possibly run by your ISP) appears to have IPv6 Internet access.

I have other IP address setup in other filters and they are still able to filter.

Re: Enabling Demographics breaks IP address filter

Top Contributor
# 6
Top Contributor

Enabling the demographics feature shouldn't have any baring on ip filters.

Bare with me pls.

 

If you do not already have a View for testing purposes, can you please create a new View and call it Testing Only.

Can you please create an include filter for your IP address and apply it to the Testing View.

Wait it approx 10-15mins and then visit the site and watch the real time reporting in the Testing View

to see if you can see your own browsing activity on the website

 

 

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

Re: Enabling Demographics breaks IP address filter

Top Contributor
# 7
Top Contributor
also can you pls provide a link to the site, it will enable me to have a look at the page code via browser for anything that may
be causing issues

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

Re: Enabling Demographics breaks IP address filter

[ Edited ]
Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

Thanks Bronwyn.

deepsignalstudios.com

I created a test view, created an include IP address filter, applied it to the view, waited 15 min, and then visited my site and now I do not see my own traffic on the realtime report, which seems to be the opposite of what I expected.
Here is a screen shot of my original filter that stopped working.

ip-filter.jpg

Marked as Best Answer.
Solution
Accepted by topic author Nick D
April 2016

Re: Enabling Demographics breaks IP address filter

Top Contributor
# 9
Top Contributor

Hi Nick :-)
after taking a quick look at the site, the ip filters are not working as expected due to the tracking code having the anonymizeIP function enabled

Copy paste of tracking code from site - 

<!--//--><![CDATA[//><!--
(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,"script","//www.google-analytics.com/analytics.js","ga");ga("create", "UA-XXX7795-8", {"cookieDomain":"auto"});ga("set", "anonymizeIp", true);ga("send", "pageview");
//--><!]]>
</script>

 

use a custom filter instead of predefined, and use a regex with a wild card for the last set of digits

eg 123\.456\.789\.*

 

 

 

 

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

Re: Enabling Demographics breaks IP address filter

Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭
Hi Bronwyn V :-)

I'm a novice learner of Google analytics and want to include a Exclude IP filter for my website analytics. I'm using dynamic ip for public network. So how i create a filter that exclude the internal network traffic used by employees & collegues at the office hours.
thank you.