This is a discussion on how can I count the number of seconds a page is viewed? within the PHP Language forums, part of the PHP Programming Forums category; "how can I count the number of seconds a page is viewed?" You can't: HTTP is a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
"how can I count the number of seconds a page is viewed?"
You can't: HTTP is a stateless protocol. Even if you were able to concoct a script which could *estimate* the time between the page loading and unloading, you *still* haven't measured anything worthwhile -- there is no way to determine whether the screen is viewed by a human (rather than a search engine or a robot), or even whether the page is viewed at all (rather than merely being on a screen somewhere, unwatched while the owner is making a sandwich). The entire exercise is pointless: it's a waste of time and effort -- effort that should instead be devoted to opposing the Evil of obnoxious Flash-based web sites which appear as blank pages in standard web browsers (such as the Paramount site). Just Say No to Flash. bblackmoor 2004-01-14 |
|
|||
|
In message <bu4dtk$d6k7e$1@ID-97660.news.uni-berlin.de>, Brandon
Blackmoor <bblackmoor@spamcop.net> writes >"how can I count the number of seconds a page is viewed?" > >You can't: HTTP is a stateless protocol. > >Even if you were able to concoct a script which could *estimate* the >time between the page loading and unloading, you *still* haven't >measured anything worthwhile -- there is no way to determine whether >the screen is viewed by a human (rather than a search engine or a >robot), or even whether the page is viewed at all (rather than merely >being on a screen somewhere, unwatched while the owner is making a >sandwich). Indeed. > >The entire exercise is pointless: it's a waste of time and effort -- >effort that should instead be devoted to opposing the Evil of obnoxious >Flash-based web sites which appear as blank pages in standard web >browsers (such as the Paramount site). Not that I've ever visited the paramount site, but yes - Flash is one of the evils of modern web sites! > >Just Say No to Flash. > >bblackmoor >2004-01-14 > -- Five Cats Email to: cats_spam at uk2 dot net |
|
|||
|
On Thu, 15 Jan 2004 09:10:17 +0000, Five Cats wrote:
>>The entire exercise is pointless: it's a waste of time and effort -- >>effort that should instead be devoted to opposing the Evil of obnoxious >>Flash-based web sites which appear as blank pages in standard web >>browsers (such as the Paramount site). > > Not that I've ever visited the paramount site, but yes - Flash is one of > the evils of modern web sites! What do you have against Flash? More specifics, please, not just personal preference. Also, although HTTP is stateless and you can't reliably track users viewing web pages and all that, you *can* get some reliable info about how web pages are being used, and you can also get some UNreliable info on how long pages are viewed and other stuff that really isn't possible to get. But, from the point of view of marketing droids and/or managers, this unreliable info is very useful. I personally have used said unreliable information to get things done the way I want them to be done. What was that quote, "lies, damn lies, and statistics"? The stats derived from http traffic monitoring *can* be used effectively, in many circumstances. Just understand that they may not be accurate. I hope I made some kind of point here. I also know that some people will be pissed off that I recognized the fact that you can lie with statistics, but thems the breaks. later... -- Jeffrey D. Silverman | jeffrey AT jhu DOT edu Website | http://www.wse.jhu.edu/newtnotes/ |
|
|||
|
On Wed, 14 Jan 2004 14:28:37 -0500, <xyzzy> wrote:
> >"David Mackenzie" <me@privacy.net> wrote in message >news:icua00tmpc1sn227e7v9kqog2p5ps1lmmt@4ax.com.. . >> >> In short, it can't really be done reliably. >Sure, it can be done reliably. >I dont see what the problem is with sessions. >Since HTTP is a stateless protocol, you have to keep a time stamp somewhere >and wait for a subsequent request. >The only page that wont get calculated is the very last page visited before >the user leaves. >This is exactly how web usage report tools work - an IP address and a >timestamp. If I view page A and then click on a link to view page B in a new window, am I still viewing page A? What if I refresh page A? Should the time I spend looking at page B be added to page A even though I'm not actually looking at it? What if I open them side-by-side? What if I right-click the link to page B and select "Save Target As..."? etc etc These grey areas are the reason I said it cannot be done reliably. These questions can only be answered if we have a clear idea of how this information is to be used. -- David ( @priz.co.uk ) |
|
|||
|
Maybe you instead of posting it to the server right away, you can storing
the calculated duration in a cookie, and retrieve it the next time the user visit the site? At least that gets rid of the mystery popup window syndrome. Uzytkownik "Disco Octopus" <discooctopusN05PAM@yahoo.com> napisal w wiadomosci news:PR1Nb.51$KW.2713@news.optus.net.au... > NotGiven wrote: > > I am guessing I would hold a variable of when it's opened, then in the > > script that runs when the page is offloaded, I coudl calcualte it. > > > > How do you store a time variable? > > > > How do you calculate the amount of time (seconds) based on two > > timestamps? > > > > Thanks for your help and/or links to articles on the subject! > > holy moly dude. > > > have a javascript variable that hold the datetime stamp when the page is > opened. Then when the page is closed, you need to tell the browser the > following... > > 1. variable Var_pageViewSeconds = Var_pageStartTime - datetime(now). > 2. post/send request to your server (onclose - or whatever it is) and send > it that variable (Var_pageViewSeconds) > > * wont work for non javascript browsers. > * wont work for me (i dont like it when page builders put the 'onclose' > thing in the page). > > hope this helps. > > |