1

I would like to set up IP address filtering in Google Analytics so that traffic coming from my home IP address is filtered and not counted as actual site traffic. I.e. I'm only interested in the traffic from IP addresses that are not that of my home IP address.

However, My ISP is changing my IPv6 address just about every day. Google Analytics allows certain regex-like matching as a filter parameter against the incoming IPv6 address. I can not include a pattern that is too specific, (i.e. a pattern that matches my current IPv6 address directly; for example 2601:602:8a00:d7d:30c9:8e0f:ecaf:3f45 will only match my current IP address until the ISP changes it again.

I also don't want to be too broad. I know the first 48 bits in an IPv6 address are specific to the ISP, and if I create a filter like 2601:602:8a00:* it may incorrectly filter out otherwise valid network traffic from other on my same ISP.

Is there a way to do this, or how do other people approach it? Thank you.

migrated from serverfault.com May 10 at 0:04

This question came from our site for system and network administrators.

  • Your problem may be that the host uses random addressing with privacy features. The host itself will periodically change the address. The ISP should be assigning a /64 network to you, and your host appears the be using random addressing (many OSes now default to privacy). The purpose of random, privacy addressing is to prevent you from being tracked on the public Internet, bu that seems to be what you want. – Ron Maupin May 9 at 23:12
  • 1
    A few well-meaning but misguided ISPs in some countries (like Germany) actually change residential customers' IPv6 prefixes extremely frequently. I have heard some of them change daily. This isn't an issue for the average consumer if the hardware is keeping up, but if you're doing anything beyond browsing the web then it can be extremely painful. First you should complain bitterly to the ISP and ask them to stop doing that. – Michael Hampton May 10 at 0:04
  • @nikkwong Google provides the Google Analytics Opt-out Browser Add-on for this purpose. – dan May 10 at 5:01
2

Your best bet would be to just block Google Analytics from running in your browsers.

There are a ton of apps that do this. I use uBlock Origin mostly to block ads but it also blocks Google Analytics scripts from running.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy