How to filter multiple IP addresses (with a single filter) in Google Analytics

When setting up Google Analytics for a client, one of the first things I do is create an ‘Internal Traffic Filter’. For sites with low traffic volumes, it’s imperative to have the most accurate data possible – so removing internal traffic from you and your client will help.

To begin filtering out internal hits from you and your client, you will need to ensure that both parties have a Static IP address(es) that you can specifically target with a filter.

Filters can be applied at the ‘View’ Level of your individual accounts within Google Analytics. Any data or hits that are excluded by a filter cannot be recovered later, so it’s best practice to keep an unfiltered view of your data too.


Select the Property View that you wish to apply the Internal Traffic Filter to.

Filtering a Single IP Address

As an example, If all internal traffic from your agency comes from a sole IP, filtering hits from this location is relatively straight forward. Follow the steps in the diagram below to create a new filter that will exclude hits from the IP that you specify.


Filtering Multiple IP Addresses

Let’s say however you also wanted to filter out your client’s office’s internal traffic, but they access the site from three completely different IP addresses. You could set-up three separate filters, but for the sake of simplicity and best practice; it’s possible to specify these within a single filter pattern using a Custom Filter and a regular expression for the Filter Pattern:


As you can see in the diagram above, multiple IP addresses can be separated with pipes (|), but it’s important to precede each dot with a backslash so that it’s treated as a regular full stop.

It’s as simple is that. Be sure to test that your filters are working correctly by heading over to Real Time Analytics within reporting to ensure your activity is not being recorded.