Find jobs - Debt Consolidation - Compare UK Credit Cards - Manga - Anime Episodes

PDA

View Full Version : Javascript tracker and Referrer Tracking?


stimpsy
Mar 27th 2006, 12:50 pm
Hi,

for the past few weeks, it seems that I get more than usual NoReferrers hits within my referers stats.

On the website, I also use my own tracker script :

Here is how I call it :

if (document.referrer)
{
document.write('<'+'img src="http://www.mydomain.com/tracker.php?r=' + escape(document.referrer) + '" style="float:left;" width=1 height=1>');
}


tracker.php only tracks down the referer and creates a cookie.

Could this script interfere somehow with the referers tracking ?

Did anybody have this problem ?

Cheers

Slapyo
Mar 27th 2006, 4:10 pm
How come you are using Javascript? Why not use PHP, $_SERVER['HTTP_REFERER']. It would probably require a little bit of change in your script, but you could get the referer in the header of your site store it in a variable and use it in your tracking script which you would have to include.

stimpsy
Mar 27th 2006, 5:13 pm
because we use this tracker code on many of our client's website too, and not all are using php behind.

Slapyo
Mar 27th 2006, 7:47 pm
Ahhh gotcha. That makes sense. ;)

mad4
Mar 28th 2006, 2:26 am
Norton blocks referrer headers by default. I reckon this accounts for quite a few 'no referrer' visitors.