Google Analytics filter: Include all traffic from an IP address

I’ve started my internship at a big school that recently implemented Google Analytics (GA). When we looked at their data we saw that many pageviews simply came from employees visiting gateway pages to internal services. Also, because we don’t have a comprehensive intranet right now many employees and students look for information at the public website. We needed a way to remove all internal traffic from our GA data.

This turned out to be easy. Google Analytics offers this feature right out of the box. On the Analytics Settings page for your account simply navigate to the filter manager and choose the ‘Exclude all traffic from an IP Address’ filter. The fill out your IP range. Some regular expression magic is needed here but there’s plenty of documentation about that to be found. A good tip is to create a new profile for the same website and apply the filter to this new profile so that you never loose any data: you’ll still have your original profile without filters.

Now that we had this sorted out we figured it might be kind of cool to also have a profile that only displays data about internal traffic. Google Analytics doesn’t offer this feature out of the box. Luckily there’s a workaround. Create a new profile for the same website again (add website profile -> add profile for an existing domain), and create a new filter. Make this a custom filter and choose Include as the filter method. Then choose Visitor IP address as the filter field and enter the same IP range you used for the exclude filter as the filter pattern. Now apply this filter to the right profile and you’re all set: you now have a filter that will only show traffic from a certain range op IP adresses. Hope this helped!

3 comments on Google Analytics filter: Include all traffic from an IP address

  1. Good post. If you’re not sure whether to use profile filters or advanced segmentation, here are some resources that could help you decide: http://bit.ly/bPWpg6

  2. Is there a way to back date data for one IP like this?

    Cheers

  3. Sure there is, read the post ;)

Leave a response: