Forum Moderators: DixonJones
The client wants nothing other than HTML and JavaScript, no ASP or anything like that, and no frames any more either. So I'm struggling to decide how best to keep their tracker working as it has done in the past. I thought about doing something in JScript, but as it doesn't store permanent variable values across pages, I fail to see how I can get it working at all. The word "cookies" springs to mind - something with a document.write statement in it to add the tracker when the first page of the site is viewed that session - but I've no idea how to get this working, or indeed if this would work at all.
I don't want to lose this project - does anyone have something a little more "concrete"?!
If you slightly modify this script [javascript.internet.com] you should be able to only display the tracker code on the first visit.
Note that this code sets the cookie to expire after 1 day, so that repeat visits within 24 hours will not be tracked. I believe that if you omit the "expires" parameter the default is to delete the cookie at the end of the session (when all browser windows are closed). This may be a more appropriate setting.