PDA

View Full Version : Quick CJPro Question. (i'd apreciate a responce)


Ron
01-29-2001, 06:52 PM
All i need to know is, Do i have to include this java code in my HTML to enable the script to track the traffic correctly?

<script language="JavaScript"> <!--
refer=""+escape(document.referrer); function isNotDefined(v) {return((v=="undefined")?true:false);}
if ((isNotDefined(refer)==true)||(refer=="")||(refer=="bookmarks")) {refer="Bookmark";}
else {wl=window.location.href; if(wl.lastIndexOf('/')!=(wl.length-1)) {wl=wl+"/";}
tdr=document.referrer; if(tdr.lastIndexOf('/')!=(tdr.length-1)) {tdr=tdr+"/";}
if(tdr==wl) {refer="na";}} u="refer="+refer; if(document.bgColor!=null)
{ itag="<font color=\""+document.bgColor+"\">"; } else {itag=""; } itag=itag+"<img
height='1' width='1' border='0' alt='' "+"src=\"/cgi-bin/cjpro/cjproin2.cgi?"+u+"\">";
if(document.bgColor!=null) {itag=itag+"</font>";} document.write(itag+"\n");
//--> </script>

sairanx
01-29-2001, 07:05 PM
either use that code or the index.cgi script. make sure that you edit the path to the cjpro script correctly.

Cooler
01-29-2001, 07:35 PM
And make sure if Yu can perform cgi scripts outside cgi-bin directory if You use index.cgi file

Ron
01-29-2001, 08:37 PM
Thanks guys, great help. It would explain why the script isn't tracking my TGP trades http://bbs.adultwebmasterinfo.com/ubb/wink.gif

I assume i can put this code on any or all of my HTML pages and the script will track hits sent to those pages from my trades?

Chosen
01-29-2001, 11:54 PM
I personally think that javascript works less accurately than server side scripts. So I'd suggest you to use index.cgi if you can http://bbs.adultwebmasterinfo.com/ubb/smile.gif

Ron
01-30-2001, 12:03 AM
yeah i have it all set up and tracking hits now http://bbs.adultwebmasterinfo.com/ubb/biggrin.gif With the index.cgi!