Mobile app version of vmapp.org
Login or Join

Login to follow query

More posts by @Nickens628

4 Comments

Sorted by latest first Latest Oldest Best

 

@Caterina187

Tracking user IPs wouldn't be to beneficial to the overall product that Google is trying to deliver.

You can however find the IP's within the Apache (or IIS) log files though. Then you can take those IP's and create filters.

This article outlines the process but is specific to RFC 1918 addresses, but that's not a requirement of the filter. Not sure if it accepts CIDR notation either but worth looking into.

10% popularity Vote Up Vote Down


 

@Bryan171

Here are the instructions to view IP addresses in Google Analytics.


Add the following code to your pages, before the traditional Google Analytics code:

<?php
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip=$_SERVER['HTTP_CLIENT_IP'];}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];} else {
$ip=$_SERVER['REMOTE_ADDR'];}
?>

Then add this code to your webpages before </body>:

<script type='text/javascript'>
_gaq.push(['_setCustomVar', 1, 'IP', '<?=$ip;?>', 1]);
</script>

To see the data:


Create a report in "Custom Reporting".
Select Custom Variable (Value 01) as first dimension.
Select all the web metrics you want to see (visits, pageviews, time on site, etc.)



VoilĂ !

10% popularity Vote Up Vote Down


 

@Bethany197

You can't do it via Google Analytics. However, you can setup your GA account so that each user is assigned a User-ID so that you can track each user with more detail if thats what you are looking to do. Note: this will require some change within your account and from privacy perspective this can be a real pain as well.

Or if you simply want to find the IP addresses that make requests to your site then you can check your server log. That log will list every IP address.

10% popularity Vote Up Vote Down


 

@Megan663

No, you won't be able to find that info. GA doesn't make it available in your reports due to privacy issues, and any collection of it is in violation of Google Analytics' Terms of Service. Please read Google's Analytics usage guidelines for clarification.

[Update July 26, 2016]

IP collection through GA is a grey area in that there is no right or wrong. It will, however, require due diligence in the investigation with your privacy lawyers/experts or into the jurisdictions of your locale (eg. European privacy laws). Alternatively, you could always make it non-argument by setting the last octet of your addresses to 0. This would sufficiently make it anonymous.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme