How to exclude multiple ip addresses in google analytics?

We already know that google analytics is specially developed for tracking external visitors apart from you and people under your company. Whenever you install google analytics on a website, the best practice is to exclude all the internal traffic. To exclude your own hits or hits generating from within your company can be filtered out from google analytics data. Below I have explained excluding single and multiple ip addresses in google analytics.

How to Exclude A single IP Address

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

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

3). Select the filter type as predefined

exclude one ip address

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 and The regex would be


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


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

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

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.

If you have any queries related to this article please get in touch with us on Twitter.