Hi everyone, Does anyone know if/where I can find IP addresses of my visitors in Google Analytics Universal reports? Maybe a specific code thta i have to add to my pages ? Many thanks.
hello Realbob Here are the instructions to view IP addresses in Google Analytics. 1. 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'];} ?> 2. Then add this code to your webpages before </body>: <script type='text/javascript'> _gaq.push(['_setCustomVar', 1, 'IP', '<?=$ip;?>', 1]); </script> 3. 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.) thank u