How to Filter Multiple IP Addresses in Google Analytics

If you came to figure out how to block multiple IP addresses in Google Analytics with 1 filter then you're in luck.

We'll need to use something called a regular expression (Regex) but I'll walk you through the whole thing step-by-step.

Go to the admin section, click on filters, add filter, and name your filter.

Select "Custom Filter"

Then select "IP Address" from the drop-down

Now have your list ready of IP addresses. As an example let's say we want to block off the following 3 IP addresses:

  • 69.158.120.11
  • 169.168.134.29
  • 69.129.100.120

Put them all on 1 line in the "Filter Pattern" text box with a | between each one. That's the pipe key. It's typically next to the forward-slash key:

Using our example we would have this so far: 69.158.120.11|169.168.134.29|69.129.100.120.

Now add a backslash \ before each period . and you'll end up with something like this: 69\.158\.120\.11|169\.168\.134\.29|69\.129\.100\.120

That's it! You can do that for as many IP addresses as you need.

Did you enjoy this?

If so you might want to check out my newsletter. Get my best, most actionable insights on growth, productivity, automation, psychology and life delivered to your inbox 1x every other week. Guaranteed to be totally gangster.

Join Newsletter
Top