Hello everyone, I'm using Google Analytics on my blog but can't find any reports in my stats showing my visitor's IP's anywhere, is there some way to view them?
I'm using Google Analytics on my blog but can't find any reports in my stats showing my visitor's IP's anywhere, is there some way to view them?
Sure is But I have to throw out the usual disclaimer first: Google considers it an invasion of privacy to see your visitor's IP Addresses. Personally speaking, I don't (much). Webmasters have long been able to view their visitors IP's in their server web logs, 3rd party visitor trackers, and even in most CMS's that they may have installed. ("CMS" for those that may not already know stands for "Content Management System". In other words, those pre-made websites that tens, or even hundreds of thousands of people use, for example, Wordpress, Drupal, Joomla, PHPNuke, and many Forum softwares), although if you're on some free Hosting service, like Blogger or Wordpress.com you may not have natural access to visitor IP addresses.
Sure, if you have someone's IP Address you can get some basic info, like the town/state they may live in and stuff like that, but to get any real personal info out of it you'd need court orders and stuff like that, and if it's come down to that, it's probably a good thing that you have their IP address, maybe the person behind it has been harassing you or some visitor(s) of your site. That said, it's the Big G's policy, so do the following trick at your own risk, there's the potential to lose your Google Analytics account.
Just paste the following code in place of the code Google Analytics gives you, or if you know what you're doing, use the relevant parts in your own code.
var _gaq = _gaq || ;
['_setCustomVar', 1, 'IP', "<?php echo $_SERVER['REMOTE_ADDR']; ?>", 2],
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(ga, s);
A little extra info:
After that you can view IP Addresses by drilling down in your "Custom Variables" area.
I want to try this.
I've tried with this
it didn't work and i can't find IP menu in custom variable.
Did not make it.
Please let me know!!!
Welcome to GD u.danse
so thank you STaRDoGG !!
it's working now!!
but i have a problem ..
almost all IP displays like this --><?php echo $_SERVER['REMOTE_ADDR']; ?>
and only few IP displays to nunber.
<?php echo $_SERVER['REMOTE_ADDR']; ?>
do you know why?
PLEASE HELP ME ...!!!!
It sounds like you may not have your page/file that you placed the code on saved as .php? (i.e. if it's on your index.htm page you should rename it to index.php). If that's not it then I'm wondering if you have PHP installed on your web server, because what's happening is the actual PHP code isn't being executed, only placed literally in that Google Adsense variable.
I tried to implement the code you suggested in your post (more than 24h ago...) and unfortunately nothing happens, I can't see the IP in the Custom Variables menu...
If you've followed all the directions to a T, double-checked for any errors in the code (typo's etc.) and made sure your page is saved as .php, and PHP is running fine on your server, I'm not really sure. How much traffic does the page that you're testing it on get? There's a chance that you and/or the visitors may have some ad blocking software installed that is blocking the Google Analytics code as well, which is somewhat common.
when I simply copied the code provided by Google Analytics, I did not have to save the page as .php; why should I do that now? Anyway, I do not know if the server I am using for my website supports this kind of files...is there any other solution then?
thanks a lot!
when I simply copied the code provided by Google Analytics, I did not have to save the page as .php; why should I do that now? Anyway, I do not know if the server I am using for my website supports this kind of files
I'll try then, but as you said could you give us the java code?