I have an organizational web site that is used by both staff and clients. We've been looking at the analytics data to see how clients are using the site, but finding that some of the usage patterns are almost certainly driven by staff using the site. We would therefore like to somehow track the type of users.

It would be fairly simple to have the server side code look at the current user's IP address to determine if it belongs to our staff network and inject this into the page, but I haven't seen any way to push this information into Google Analytics.

To be clear, I do not want to eliminate the internal traffic from tracking. I'm still interested in it. I just want to be able to separate the two.

Any ideas?

1 Answer 1


You can filter IP addresses at Google (full instructions here):

To exclude internal traffic from appearing in a report view, create a custom filter to exclude a specific IP address or a range of IP addresses.

Filter Type: Custom > Exclude

Filter Field: Visitor IP Address

Filter Pattern:

For example, if the single IP address is, then enter

For example, if the range of IP addresses is and, then enter ^176.168.1.([1-9]|1[0-9]|2[0-5])$|^10.0.0.([1-9]|1[0-4])$ Remember to use regular expressions to enter an IP address.

You can create new profiles within your Google analytics account (set up instructions here) if you want to be able to create two ways of tracking traffic for example:

  • Internal Traffic Report profile (with filters to show only internal IP addresses)
  • External Traffic Report profile (with filters to show only external IP addresses)
  • I don't want to entirely exclude internal traffic (as this would seem to do). I simply want to be able to separate internal and external traffic as they behave differently.
    – Kris
    Commented Aug 14, 2012 at 10:59
  • You can create a new profile within the account for internal, so on the external profile it excludes your internal IP addresses and then include your internal IP addresses on the internal report
    – Vince P
    Commented Aug 14, 2012 at 11:07
  • Updated answer with profile info.
    – Vince P
    Commented Aug 14, 2012 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.