agusus Posted February 11, 2004 Posted February 11, 2004 This is something I've been wondering about.... 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. I've written my own, because it gives me a lot more control over what info I get. 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). 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. 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. Anyone know how they do this? Maybe then I could apply it to my script. -John Quote
Alan Posted March 11, 2004 Posted March 11, 2004 agusus, I am not TCH staff, therefore you do not have to take my advice. IPs, referring URLs, etc to your site. The cPanel includes AwStats, it gives you all that info. Quote
Deverill Posted March 11, 2004 Posted March 11, 2004 Hi John, I'm not great at scripts, especially the java flavors, but here's a clip from one of their images: <script language="javascript"><!-- an=navigator.appName;d=document;function pr(){d.write("<img src=\"http://t0.extreme-dm.com", "/0.gif?tag=nettwiz&j=y&srw="+srw+"&srb="+srb+"&", "rs="+r+"&l="+escape(d.referrer)+"\" height=1 ", "width=1>");}srb="na";srw="na";//--> </script> 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. Hope it helps! Quote
HCSuperStores Posted March 11, 2004 Posted March 11, 2004 I'll add on to what TCH-Jim said. He's right! 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. The only way to get the information from the client to the server is by passing a string of some sort using a script. 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. 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. That all I know on this. Good luck to you! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.