In order to exclude false site visits from my Google Analytics, I have implemented a filter that excludes everything from an IP address range.
First, I check my IP address. I used my “WAN” ip address since that’s what Google sees when I visit my site. I don’t have a static IP so this will likely change over time.
Now that I know my current IPaddress… what is the IP allocation range for ViaSat? Lets look at ARIN (American Registry for Internet Numbers), for the answer…
This gives us a nice range of 131,072(2x256x256) IPv4 addresses. I decided to just filter out anyone who is coming in over ViaSat’s ip range. Sorry ViaSat visitors but your only being filtered from Analytics, so this isn’t such a big deal.
Log in to your Google Analytics account, then click on Admin. Click “All Filters” then click “New Filter.” Give it a name, then select “Custom” filter type.
Select “IP Address” in the Filter Field if it’s not already. Then in the “filter Pattern” text box, you put a “regular expression” that suits the range you want. In this case I am doing
This should exclude the range from 188.8.131.52 to 184.108.40.206
Hope this helps someone.