Regex for Blocking IP address in Google Analytics

This is a frequently asked question about blocking IP addresses in Google Analytics.

Blocking a range of IP addresses

If you have a range of IP addresses that you want to block then use this RegEx in Google Analytics

Example:

216.67.94. 01 - 216.67.94.99

181.69.245.01 - 181.69.245.01

Then you can user

2161\. 67\. 94\. \d*|^181\. 69\. 245\. \d*
The | character in the middle means OR.

Leave a Reply

Your email address will not be published. Required fields are marked *