Google\'s detection of Unusual traffic is nice. But how is it handling Dynamic IP addresses?
For example,I do not have ranges of IPs and my ISP provides Dynamic IP which
We had the task to exclude a whole company from Analytics. The internet router got IP renewed circa once a day. Turned out that this router like nearly all common routers nowadays offered some options to enable dynamic IP services. Like noip.com for example.
And what happens now is, that the router everyday automatically pushes its new IP to noip.com, where it gets associated to the domain name you registered before. Now on your page you can dynamically check that domain's IP and if it matches the client's (browser's) IP you exclude the Analytics scripts from being printed to the page.
In my case I was on PHP and something along the lines of the following snippet worked out fine. See gethostbyname().
$print_tracking_scripts = TRUE;
if (gethostbyname('my-unique-name.ddns.net') === $_SERVER['REMOTE_ADDR']) {
$print_tracking_scripts = FALSE;
}
if ($print_tracking_scripts) {
// Print or include tracking scripts however you like.
}