Trackers And Getting Referring Urls

liunx

Guest
This is something I've been wondering about....<br />As you know, there are many trackers out there (eg, extremetracking.com) that let you put an image on your site and it tracks the IPs, referring URLs, etc to your site. <br /><br />I've written my own, because it gives me a lot more control over what info I get. <br />Usually I include it on pages just by doing a php include(). But sometimes I use it with the typical img tag method. (ie, I use the address of my php tracker script as the img src). <br /><br />The only problem is that then the referring URL is the address of the page that the image is on, not the website that sent the person to that page. <br />But the public domain trackers like extremetracking do not have this problem. They still get the correct referring URL even though the image is on your own page. <br /><br />Anyone know how they do this? <br />Maybe then I could apply it to my script. <br /><br />-John<!--content-->
agusus,<br /> I am not TCH staff, therefore you do not have to take my advice.<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->IPs, referring URLs, etc to your site.<!--QuoteEnd--></div><!--QuoteEEnd--><br />The cPanel includes AwStats, it gives you all that info.<!--content-->
Hi John,<br /> I'm not great at scripts, especially the java flavors, but here's a clip from one of their images:<br /><script language="javascript"><!--<br />an=navigator.appName;d=document;function<br />pr(){d.write("<img src=http://www.totalchoicehosting.com/forums/lofiversion/index.php/\"http://t0.extreme-dm.com",<br />"/0.gif?tag=nettwiz&j=y&srw="+srw+"&srb="+srb+"&",<br />"rs="+r+"&l="+escape(d.referrer)+"\" height=1 ",<br />"width=1>");}srb="na";srw="na";//--><br /></script><br /><br />It seems to me that when you hit the page that has the image the javascript is getting the referer string and then passing it along to the xtreme tracking server via parameters on the call mysvr.com/image&www.totalchoicehosting.com type of call. As I said, I'm not up on decoding the script but it seems that's what's going on.<br /><br />Hope it helps!<!--content-->
I'll add on to what TCH-Jim said.<br /><br />He's right! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> <br /><br />Seriouisly, the only way to get everything that you can possibly track is at the HTML/Javascript level. Another way to say this is at the "client" level. When you get to the server, some of the envirnment variables change or aren't even available.<br /><br />The only way to get the information from the client to the server is by passing a string of some sort using a script.<br /><br />Javascript is one way. There is also in-line perl, PHP and VBScript that you can embed into your HTML. These scripting languages, that execute on the client side, allow you to access these variables.<br /><br />In the end though you have to pass it to the server so you can track the information. That's why a bunch of these tracking sites use an image with javascript.<br /><br />That all I know on this. Good luck to you!<!--content-->
 
Back
Top