How to exclude multiple ip addresses in google analytics?

Let's start

We already know that google analytics is specially developed for tracking external visitors apart from you and people under your company. Excluding internal traffic is one of the essential steps in configuring google analytics.

This article will help you exclude single and multiple IPs from your analytics account using multiple methods.

How to Exclude A single IP Address

1. Select the view for which you want to apply filter and then go to filters and click add filter

2. Enter the filter name as “exclude internal traffic”

3. Select the filter type as predefined

4. Enter your IP address as displayed in the image below

 exclude one ip address

Alternate Option: Exclude Single IP

There is another way you can use to exclude traffic from your own browser. To do this, install Da Vinci Tools chrome extension. once you install, open your Google Analytics account.

you will then see a switch on the top right of your account along with your tracking ID.

 da vinci tools

when you turn the toggle off, this extension will block your hits going to GA.

This is a good solution for testing purposes and also for excluding internal traffic. once you add this extension, it will work for all properties in your analytics account. you will not have to add separate filters for each account/property.

How to Exclude Multiple IP addresses

Everything is similar to how we did for a single ip address above except, you have to enter regex for multiple ip addresses. Let’s say we have two exclude two different ip addresses 192.168.0.1 and 192.168.1.1. The regex would be

^192\.168\.0\.1$|192\.168\.1\.1$

Start with ‘^’ then precede each dot with a backslash(\) and put ‘$’ at the end of ip and separate multiple ips with a pipe(|). The easiest way to write regex for multiple ips is first write down the ips together

1. 192.168.0.1192.168.1.1

2. Add ‘^’ before the first ip address ( ^192.168.0.1192.168.1.1)

3. Add pipeline between both ip addresses (^192.168.0.1|192.168.1.1)

4. Add backslash just before every dot (^192\.168\.0\.1|192\.168\.1\.1)

5. add ‘$’ sign at the end of each ip address (^192\.168\.0\.1$|192\.168\.1\.1$)

You can add multiple ips using the above regex.

 exclude two or more ips

How to exclude dynamic IP addresses

One of the most easiest way to exclude traffic from multiple dynamic ip addresses is to install google analytics opt-out addon. This addon tells the javascript not to send the pageview hit.

Don't miss out when new resources launch

Our customer analytics experts share wisdom only once a month

Share now
We are customer-analytics consultancy that transforms messy data into actionable insights that will help you grow your company and make better data-backed decisions.