Filter out traffic to your website from people on your corporate network.
Filters in Google Analytics allow you to clean up traffic in order to collect qualitative data on your website.
One of the main filters to be set in Google Analytics is to exclude internal traffic.
In this way any traffic from employees or individuals associated with your business will be excluded from the count of the main metrics and the data collected will be more qualitative.
Note: The behaviour of the employees does not correspond to external visitors and we want to make decisions based on the behaviour of our external visitors, not the employees.
As an example, let’s say you have an ecommerce website. Internal traffic might include stress testing that will send a large number of hits to a particular page on your website. Your reports will show a large number of hits on this page and it will be difficult to discern how many hits came from customers and how many hits came from your stress testing.
Things to consider before using filters #
The solutions described below use Google Analytics filters, so to avoid problems and confusion, you’ll need some basic understanding of how they work:
The changes made by filters are permanent!
Therefore, if your filter is not correctly configured, you run the risk of losing valuable data forever.
Filters are not retroactively
Therefore, use segments to temporary modify your reports and apply them retroactively, rather than the permanent effect of filters that only apply moving forward in time.
💡 Pro Tip: You should ALWAYS maintain an unfiltered view of your data so you always have access to your full data set.
The Issue: identify the internal traffic #
Unfortunately there is no obvious way to identify a staff visitor.
Approach #1: IP Address filtering #
The typical approach to excluding internal traffic in Google Analytics is by IP address exclusion, but that really only works with a small number of fixed locations with stable internet connections.
How it works #
In terms of setup, this is simply a matter of inputting each of these IP addresses into GA, and creating a new user category called “Internal Staff.” That’s it! You’re done.
Limitations #
This method can’t be apply when:
You have to filter multiple IPs or locations:
-
Employees working from home (home office) or remotely.
Employees working from multiple locations (different offices, on-client-site, etc.).
Employees are constantly traveling (hotels, airports, restaurants, etc.).
If your Google Analytics is using IP Anonymisation (anonymizeIp) required by the GDPR and other privacy laws.
The IP changes constantly or is dynamic:
You or your team access the website on mobile devices often using mobile data (3g, 4g/LTE, 5g, …).
You or your team use VPN services to access the website from different countries.
Your Internet Service Provider (ISP) changes your IP constantly, which means you have a dynamic IP.
Approach #2: Uses Cookies #
In short, rather than filtering traffic based on IP you will use a first-party cookie to determine whether traffic is internal or external
How it works #
Get all the employees to use a specific URL when they visit the site, and from there on create a filter to exclude them with the help of a custom dimension
Conclusion #
Considering that there is not as straightforward solution but only several possible alternative to overcome the problem and considering all the limitations of the filter based on IP address. The best solution to the problem, at the moment, is using cookies to identify the internal traffic.