← field notes

How a website measures how long you stayed

The number you never agreed to generate

Every time a page loads, a clock starts somewhere you can’t see. Not on your device, not in a way you consented to, but in a browser event listener or a server log that starts counting the moment the page paints. Dwell time, the length of a single visit to a page, is one of the most quoted metrics in digital marketing and one of the least understood outside of it. Analysts treat it as a proxy for interest. Search engines are rumored to treat it as a proxy for quality. Ad networks price inventory partly on it. And almost none of that number is measured the way people assume it is.

Dwell time tracking matters because it sits at the center of a few different fights: publishers trying to prove engagement to advertisers, platforms trying to rank content, and fraud teams trying to tell a human reader from a script that hits a page and leaves. Understanding how the measurement actually works, and where it breaks, explains a lot about why bot traffic is so hard to filter out and why some of the “engagement” numbers in ad dashboards don’t hold up.

Two clocks, two different stories

There isn’t one dwell time. There are at least two competing definitions running at once, and they disagree constantly.

The first is server-side dwell time, sometimes called time-on-page as inferred from request logs. A server sees a request for page A, then some time later a request for page B from the same session, and subtracts the timestamps. This is the oldest method and it has a structural flaw: it can’t measure the last page in a session. If someone reads a page and closes the tab, there’s no second request to subtract against, so that visit either gets logged as zero seconds or gets dropped from the average entirely. Bounce-heavy sites, where a lot of visitors read one page and leave, systematically underreport how long people actually spent reading.

The second is client-side dwell time, measured by JavaScript running in the visitor’s browser. This is what most modern analytics platforms actually use. A script fires on page load, starts a timer, and periodically sends “still here” pings, or it waits for the page to unload and sends one final beacon with the total elapsed time. This fixes the last-page problem but introduces a new one: it only works if the browser actually executes JavaScript, keeps the tab in a state where timers fire, and stays connected long enough to send the final signal.

What the browser is actually asked to report

The mechanics of client-side tracking rely on a small set of browser APIs, and each one has a specific job.

The Page Visibility API tells a script whether the tab is the active, foreground tab or has been backgrounded, minimized, or covered by another window. Serious analytics tools pause their dwell timer when the tab goes invisible, because a tab sitting open in the background for twenty minutes while someone works in another window isn’t twenty minutes of attention. This single API is why “time on page” and “time since page loaded” are not the same thing, even though sloppier implementations conflate them.

The beforeunload and pagehide events fire when a visitor navigates away or closes the tab, giving the script a last chance to report the final dwell time. The trouble is that these events are unreliable on mobile browsers, especially when a user swipes an app away rather than tapping a close button, and some browsers throttle or skip them entirely to save battery. To work around this, most trackers now use the sendBeacon API, which queues a small payload to be sent asynchronously even after the page has started tearing down, instead of trying to fire a synchronous request that the browser might just abandon.

Scroll depth and mouse movement are often layered on top as a secondary signal. A tab can sit open and “visible” for ten minutes while the person is on the phone, and pure dwell time won’t catch that. Some engagement-scoring systems add interaction events, scrolling, clicking, key presses, as a filter: no interaction after some threshold and the session gets marked idle even though the visibility timer never noticed.

Where the measurement quietly fails

None of these mechanisms measure attention directly. They measure proxies for attention, and every proxy has a failure mode.

A visitor with JavaScript disabled or blocked, which includes a meaningful slice of privacy-focused browser users and most simple scraping tools, generates no client-side dwell signal at all. The page loaded, the content was fetched, but the analytics platform has nothing. Depending on how the reporting pipeline is built, that visit either gets recorded as a zero-second bounce or gets excluded from the dwell time calculation entirely, which quietly biases the average upward or downward depending on who’s being filtered out.

A visitor on a flaky mobile connection can trigger the opposite problem. The page loads, the visibility timer starts, and then the connection drops before the final beacon can send. The session either times out server-side after some inactivity window, or it gets stitched together incorrectly if the same visitor reconnects and the analytics platform doesn’t recognize it as a continuation.

Then there’s the traffic that was never a person reading. Automated requests, whether from search engine crawlers, monitoring tools, or less benign scraping and click activity, interact with the dwell time system in whatever way their code was written to. A script that fetches a page and immediately closes the connection produces a near-zero dwell time and looks like a bounce. A script built specifically to blend into analytics, one that executes the page’s JavaScript, waits a plausible interval, and even fires a few scroll events before leaving, produces a dwell time number that looks statistically similar to a real visit. The gap between those two behaviors is exactly why dwell time alone is a weak fraud signal on its own. A single well-shaped duration proves nothing; what tends to give automated traffic away is the pattern across many sessions, identical or near-identical durations repeated at a rate no human population produces, timing that’s too regular, or interaction events that fire in a sequence real hands don’t produce.

Why platforms treat it as a ranking signal, cautiously

There’s a long-running belief among SEO practitioners that search engines use dwell time, specifically the pattern of clicking a result and quickly returning to the search page, as a ranking input. Search engines have been consistently vague about whether and how this is used, and for good reason: the signal is noisy in exactly the ways described above. A short dwell time might mean the page answered the question immediately, which is good, or it might mean the page was useless, which is bad, or it might mean the visitor’s connection dropped, which means nothing at all. Any system trying to use raw dwell time as a quality signal has to account for that ambiguity, which is why serious ranking systems that do incorporate engagement data tend to blend it with dozens of other signals rather than acting on it alone.

The defensive side: what analytics and fraud teams actually check

Teams trying to separate real engagement from noise or manipulation don’t lean on a single duration number. They look at the shape of the whole session: whether visibility events and interaction events arrived in a plausible order, whether the same fingerprint or IP range is producing suspiciously uniform dwell times across many sessions, and whether the beacon that reported the final duration came from a client that also passed the other checks a real browser would, like rendering behavior, timing jitter, and consistent header and TLS characteristics across the visit. A duration by itself is cheap to fake in isolation; a duration that’s consistent with everything else a real browser does around it is much harder to fabricate at scale, which is exactly why the strongest defenses correlate dwell time against other independent signals rather than trusting it in isolation.

None of this makes dwell time worthless. It’s a genuinely useful metric when read carefully, alongside its known blind spots, and it’s one piece of a larger picture rather than a verdict on its own.

Curious how the rest of that picture fits together, from fingerprinting to bot detection to the traffic patterns that give automation away? Head back to the Hidden Internet for more.

Get new guides and videos first — join the Telegram channel.

watch
The Hidden Internet on YouTube

Every field note starts as a short documentary. Watch the systems in this piece explained on screen.

subscribe →
read on
More field notes

The rest of the series on how the modern internet detects, tracks, and sorts the traffic that reaches it.

browse the archive →