The ROI Revolution Blog

« New York-based retailer BuiltNY tracks print campaign with Google Analytics | Main | Start at the Beginning: Making Sense of the Google Analytics Toolbox »

View Visitor IP Address in Google Analytics

September 20, 2006

View Visitor IP Address in Google AnalyticsThere's no way to view your visitors IP addresses right out of the box with Google Analytics. You can view visitor location and ISP in Marketing Optimization > Visitor Segment Performance, under the Domains and Geo Location reports.

But surely Google Analytics must collect the IP address, or there's no way that it could calculate visitor location and ISP.

In fact, it does collect this data from each visitor that accesses your site. Better still, the data is easily accessible with a fairly straightforward Advanced Filter and the User Defined variable. Here's how.

You'll need to create a new filter for your profile. Bear in mind that if you are using any custom visitor segmentation with the __utmSetVar function, you should set up a new profile for the IP address data. If you don't, you'll overwrite your custom segmentation.

In the Filter Manager, enter the following filter information:

Filter Name: IP Extraction
Filter Type: Advanced
Field A -> Extract A: Visitor IP Address / (.*)

You can leave Field B and Extract B blank.

Output To -> Constructor: User Defined / $A1

( Click here for a screenshot )

Then be sure to apply the filter to your profile.

This will take the User Defined field and replace it with the IP address (which is used behind the scenes in several reports, but unfortunately does not headline in its own). You will then be able to Cross Segment by User Defined in your reports to see all of the IP addresses for a particular entry, or view them in the User Defined report under Marketing Optimization > Visitor Segment Performance.

Now, there is a huge caveat to this entire procedure. If you take a look at Item 7 in the Google Analytics Terms of Service, you'll notice that you are not allowed to "associate any data gathered from Your website(s) (or such third parties' website(s)) with any personally identifying information from any source". So, using the filter above will break the ToS. Just a heads up.

An update to this post: There has been a lot of talk lately in the analytics blogosphere and beyond about Google's commitment to privacy and the way they handle sensitive data (like IP addresses). The excellent GA Experts blog post about the (extremely quick) response taken by Google on this matter:

Previously, by stripping out the visitor IP address and adding it to the User Defined variable, the IP address would show up in reports. However, now this report (Marketing Optimisation -> Visitor Segment Performance -> User-defined) now shows a value of '(not set)' for all visitors, as it would if the User Defined variable had never been used.

We've noticed the same thing, so we recommend that anyone who has attempted this hack on their own Google Analytics profiles remove it. As we've mentioned above, it violated your Terms of Service and it no longer works.

Interested in learning more about Google Analytics?
Attend our LIVE Google Analytics Seminars for Success training in Chicago, IL Wednesday, September 16th, 2009 and Thursday, September 17th, 2009 or get the latest tips and tricks sent to you via our free, twice-monthly Google Analytics newsletter.

TrackBack

TrackBack URL for this entry:
/mt/mt-tb.cgi/164.

Comments

Something I would love to see, maybe even coming from you, would be an ROI integration into phpLinkDirectory to track conversions and sales. I've been trying to research this and get it working, but I can't get it working for the life of me. Let me know if you have any insight on this. Thanks you.

Posted by: Jonathan Dingman at October 8, 2006 8:04 PM

is not working, it show (not set) at Marketing Optimization > Visitor Segment Performance > user defined

Posted by: diopter at October 14, 2006 1:05 AM

As the creator of a real-time search hit tracker, I sympathize with Google's position. Exposing IPs through a web reporting user interface has potential privacy and security risks. It's just a bad ideal all around. We made that decision out of the starting gate.

Posted by: Mike Levin of HitTail at March 20, 2007 4:40 PM

It seems to be a strange position of Google. Information about IP addresses hardly breaks any privacy rules as there is no way to access a web site and not to reveal the IP address. So any visitor by default agrees for his / her IP to be collected. If higher level of privacy is need, higher level tools should be used by users. That's how it is done, you all know that.
This Analytics limitation just makes the product less handy as info about IPs is anyway stored in web-server's log files and can be easily accessible and analyzed by site owner.

Posted by: Dmitry Shandyba at July 14, 2007 1:28 PM

Just to put on a conspiracy hat for a moment.. I periodically check for click fraud by viewing IP addresses and frequency of visit. Like the previous poster said, I have my own server logs which keep this information, but it would be a whole lot easier to view it in analytics. Just a thought..

Posted by: Steven at September 3, 2007 4:23 PM

@Dmitry: I tend to agree with you. If you're surfing the web, and you're not using a proxy, then someone, somewhere can view your IP address.

@Steven: Agreed. We'll keep you posted if Google's position ever changes.

Posted by: Michael Harrison at September 5, 2007 9:59 AM

The Visitor IP Address is no longer an option on Google's drop down menu.

Posted by: Dave Smith at November 1, 2007 8:23 PM

@Dave: You are correct, sir. As I mentioned in the update, Google views an IP address as personally identifiable information, and thus removed the option for using it in your filters.

Posted by: Michael Harrison at November 6, 2007 11:20 PM

Post Your Comments

Feedback Form