homepage Welcome to WebmasterWorld Guest from 54.205.52.110
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: Receptional & mademetop

Website Analytics - Tracking and Logging Forum

    
Session tracking headaches...
Difficult client proving to be a nightmare.
NetGrease




msg:899248
 1:28 pm on Aug 20, 2001 (gmt 0)

Redesigning a site for a client, and have been told that I HAVE to include their current HTML-based tracker still. Trouble is, in the site's current frames format, it acts as a session counter. When taken out of frames however, it of course reverts to being a simple hit counter.

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"?!

 

mark_roach




msg:899249
 9:04 am on Aug 21, 2001 (gmt 0)

Your idea sounds as if it should work.

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.

NetGrease




msg:899250
 10:53 am on Aug 21, 2001 (gmt 0)

That looks pretty much "on the money" thanks mark. I'll have a bash at mod'ing this script, and then adding a close.sibling statement to the main page, activated via a timeout.

Should keep everyone happy with any luck.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved