Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

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 176.168.1.1, then enter 176.168.1.1.

For example, if the range of IP addresses is 176.168.1.1-25 and 10.0.0.1-14, 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)
share|improve this answer
    
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 Aug 14 '12 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 Pettit Aug 14 '12 at 11:07
    
Updated answer with profile info. –  Vince Pettit Aug 14 '12 at 11:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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