Jump to content

Recommended Posts

Posted

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

  • 1 month later...
Posted

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.

Posted

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!

Posted

I'll add on to what TCH-Jim said.

 

He's right! :dance:

 

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!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...