Creating a Filter to Exclude Internal IP’s Traffic in Google Analytics

Google Analytics is an excellent tool for analyzing traffic. It is detailed, real-time, and free, but there are a few issues like spam traffic and internal IPs that can negatively affect your data. If you have a company with multiple employees that visit your website on a regular basis, sometimes several times a day, that can seriously affect the Google Analytics data.

Unfortunately, there is not one solution for this problem. You will need to take a different approach and combine multiple methods to filter out internal traffic. There are two simple ways to get rid of internal traffic. The first is IP address filtering, and the second is filtering by network domain.

IP Address Filtering

Filtering traffic by IP address is the easiest way to filter out traffic. If your company has a static IP address or a certain address range, then the process is pretty straightforward. All you need to do is to exclude the traffic coming from that IP address or from that range of IP addresses. Since most businesses have static IP addresses, this method is applicable to a lot of people.

Step 1

Before you can filter out an address, you need to know what address to filter out. Finding out your own IP address is very simple with a quick Google search for “what is my ip”. There are two types of IP addresses currently being used, IPv4 and IPv6. They look different, but Google supports both standards, and Google Analytics can filter both IPv4 and IPv6. Now you are ready for the next step and that is creating the actual filter.

Step 2

The process of filtering an IP address is very simple and can be done with just a few clicks. Navigate to Admin → All Filters, which is located under the Account drop-down menu on the left side. If you want to exclude one address, use the settings shown in the image bellow. Set filter type as predefined, and then from the drop-down menus choose Exclude, traffic from the IP addresses, that are equal to, in that exact order. Now, just put the IP address you want to exclude, and you are done.

creating-a-filter-to-exclude-internal-ips-traffic-1

If you want to filter out an IP address range, you will need to select the Filter Type as Custom, then Exclude and select IP Addresses from the drop-down list. Now, in the Filter Pattern, enter a regular expression for the IP Address range like it is shown in the picture.

creating-a-filter-to-exclude-internal-ips-traffic-2

Filter By Network Domain

For very large companies that own their own Network Domains, filtering by Network Domain may be the most optimal way to go. There are few Domain Lookup tools where you can input your IP address from above and see if your company’s name is returned. For smaller companies or individuals, this is usually the name of the service provider.

Another way to check this would be to use Domain reports in Google Analytics. Just navigate to Audience → Technology → Domain.

Navigate to Admin → All Filters, which is located under the Account drop-down menu on the left side. The settings are a bit different than before. Set Filter Type to predefined, then from the drop-down lists below choose Exclude, traffic from the ISP domain, that contain, in that order just like in the image below. In the ISP Domain, enter the domain you want to filter out. And you are done!

creating-a-filter-to-exclude-internal-ips-traffic-3

Once all of that is done, the next great step would be to get rid of spam, for which we also have a great tutorial on our website.

If you like my articles,