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 may change everytime my router reboots and it changes everyday. So here, when I get some IP address I see notification w/o captcha. After several reboots I seem to get an IP which was not blocked!
How to solve this type of issues in Google Analytics. Also I know very well how to exclude traffic from single IP and with ranges of IPs but I do not know how to block internal traffic whose IPs changes everyday?
Why not simple add a filter:
For example for IP ranging from 182.73.42.140 to 182.73.42.150 The regex would be:
^182.73.42.(1(4[6-9]|50))$
Here's a screenshot for same
If you have trouble understanding RegEx, you may use this tool to create IP range regex
I just had someone ask me this questions and stumbled upon this thread. I found an alternative solution using this Chrome Extension to block yourself from Analytics on sites.
FYI, I thought of another approach using HTML5’s localStorage feature. (The advantage over the cookie is that when you clean your browser’s cookies, localStorage values remain.) I’ve written a blog article about it here: Google Analytics: Exclude your own visits
There are problems with many of the popular answers to this question...
So, I combined several other solutions into something that works for me...
I keep a "developer cookie" set on my machine at all times just for the domains that I manage. This cookie has a unique value that is specific to me. Then I simply check for this cookie in my scripts before sending any data to Analytics.
Examples of how I put the code into my pages...
JavaScript
PHP
Verifying that the HOST name equals the domain of my live site ("mydomain.com") ensures that the analytics data will never be sent by ANY visitor while viewing from a test domain such as "localhost" or "beta.mydomain.com". In the examples above, "www.mydomain.com" and "mydomain.com" are the two valid domains where I DO want visits to be recorded.
The live site sends data to analytics as expected UNLESS a developer cookie is found with matching values. If it finds that unique cookie set on my device, then my visit will not count towards my totals in Google Analytics (or whatever other analytics tool I might decide to use one day).
But what happens when my cookies get cleared? How do I keep the "developer cookie" set in the background? I created my own Browser Extension for that... https://chrome.google.com/webstore/detail/lknhpplgahpbindnnocglcjonpahfikn
It works just for the specific domains that you choose. You customize your own unique NAME and VALUE for the cookies in the extension's settings.
This method can easily be used by a team of people as long as they use the same NAME/VALUE pair, so developers, content creators, proofreaders, and anyone else in your organization can all view pages without inflating the statistics.
Feel free to share my solution and use my extension to keep those cookies set.
There are two options.
Check for the IP address you have if they are between some range then you can set a range in the IP address filter. Excluding traffic
Setting cookies
Better option is to use Google Analytics Opt-Out Browser Plugin found here:
https://tools.google.com/dlpage/gaoptout