faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 27 people (33%) answered Yes
Recently 2 of 10 people (20%) answered Yes


How can we log user interactions on a web site using event handlers and cookies? Refer to http://zing.ncsl.nist.gov/hfweb/proceedings/etgen-cantor. Th

Apr 4th, 2008 19:34
ha mo, Colin Fraser, dev fakun,

This would have to be my most used statement in FAQTS, "Why try to 
reinvent the wheel?" You have all those tools for your ISP, you may also 
be able to get a free counter from 
So why bother using events and cookies? 
Realistically, what you are asking is time consuming and not guarranteed 
of success anyway, so use what works, not what you think may be a 
challenge. However, if you have the time, try linking events to separate 
coded event handlers. Using a switch statement in conjunction with a 
number of arrays with incrementing counters, then saving the counters to 
a text file prepared on FrontPage may be a good approach. I wont try it 
myself, mainly because I am too lazy, and given the number of arrays 
needed to be created, and the high probablity of inaccurate reporting 
anyway, I would just stick with the traditional server logs and so on.