Forum Moderators: DixonJones
I can't use Awstats for this since their statistics are aggregated by the month, and the client wants shorter testing periods for each header design. So all I know to do is try to write something of my own - but how and in what language?
Thanks in advance,
Matthew
Can javascript automatically (and transparently) submit forms for server-side processing? If so, I was wondering if there would be some way of using Javascript to set a cookie on the user's machine, then count how long they stay on each page. When a page was left, either for another page on the same site or for another site, the script would submit the cookie data, the URL, and the time spent on the page to a server-side script that would process and log the data. Does that sound feasible at all?
What my software does is to use the raw logs. It then uses figures out the elapsed time by looking for the next page view in the log for that user (using session cookies that are also recorded in the log).
As their is no way to determine how long someone looked at the last page without using Javascript, the analyzer takes the median elapsed time for that last page, and adds that amount to get the total time a visitor spent on the site.
If you don't / can't put session id info in the log, you could use a web beacon/page tag to log that information via a script on your site. Thats more work, but a viable alternative. You might also be able to get a hit on each page by using the javascript "unload" event, but then that might be problematic for some browsers, as that event is used by spammers...
Hope that helps,
Larry