How to Exclude an IP address Range in Google Analytics

In this post I will discuss how you can easily exclude an IP address range in Google Analytics. One can create multiple single IP based filters however it can quickly become unmanageable.  If you have basic understanding of regular expression then you can quickly create a single filter which excludes traffic from a range of IP address. This approach can be very effective if you want to exclude internal traffic sources like corporate intranet etc. 

1. Create a New Filter

Go to Admin ->Filters and Click on Create a New Filter.  Make sure to select “Custom” as the Filter Type.

Create a New Filter

2. Create Regular Expression

Now that we have created a filter, we now need to create a regular expression for the IP range. In order to create a regular expression visit this site and input the First and Last IP Address and click on Generate Regex Button. It will create a regular expression for you. Refer to the screenshot

Create Regular Expression

3. Configure the Filter

Now that we have the regular expression , it now time to actually configure the filter. Go Back to Google Analytics and enter the Regular Expression in the Filter Pattern text box and click save. Thats it.. you are done!!

Create IP Based Filter

 

Conclusion

Creating a filter in google analytics is quite simple. In this post we have covered creating a filter based on IP address range , however it is possible to create filters based on browsers, device, country etc.

Comments

  1. Hi, this is a comment.
    To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.

Speak Your Mind

*