What is time on page?
Time on page is how long a visitor spent on one page before moving to the next. Classic analytics calculates it by subtracting one pageview timestamp from the next, which means it cannot measure the final page of any session at all. Modern engagement time replaces it by sampling while the tab is genuinely visible.
Formula
Classic time on page = timestamp of next pageview - timestamp of this pageview
- timestamp of next pageview
- When the following page in the same session loaded.
- no next pageview
- If the session ends here, there is no second timestamp, so the value is 0 and the page is normally dropped from the average entirely.
Worked example
A blog post with 1,000 pageviews in a week.
| Views where the visitor went on to another page | 180 |
|---|---|
| Total measurable time across those 180 views | 12,600 seconds |
| Views that ended the session, so unmeasurable | 820 |
| Calculation | 12,600 / 180 |
Average time on page = 70 seconds, computed from 18% of the traffic The reported average describes the minority who clicked onward. The 820 people who read the post and left, the ones the post was written for, contributed nothing to it.
Why the classic metric cannot be trusted
Two structural problems, both unfixable within the original definition.
The first is the missing final page. Time on page is a difference between two pageview timestamps, so the last page of every session has no second timestamp and no measurable duration. Since bounced sessions consist entirely of a final page, the metric is computed from a self-selected sample of visitors who behaved differently from the ones it excludes.
The second is that an open tab is not a read tab. A visitor who opens your article, switches to another window for forty minutes and comes back to close it registers forty minutes of rapt attention. Averages get dragged upward by background tabs, by people who went to lunch, and by anyone who left the site open overnight.
What engagement time measures instead
Engagement time counts only the time the page was actually in front of someone. The tracker accumulates time while the tab is visible and the visitor is active, pauses it on tab blur through the Page Visibility API, and sends the accumulated total when the page is hidden or unloaded.
That fixes both problems at once. The final page of a session is measured like any other, because the measurement no longer depends on a subsequent pageview. And a backgrounded tab stops accruing time, so the average stops being inflated by browser habits.
Read the median rather than the mean. Time distributions on a web page are heavily skewed by a small number of very long sessions, and the mean chases them. The median tells you what a typical visitor did.
Live demo
See it on real data. The live demo is a fully populated dashboard on demo traffic, with no signup and no card.
Open the live demoUsing it well
Pair it with conversion events
Time alone cannot distinguish attention from friction. Check whether visitors completed the page’s intended action and use replay to understand difficult visits.
Compare against reading length
A 1,800 word article read in 25 seconds was skimmed. The useful benchmark is the page's own estimated reading time, not a site-wide average.
Do not optimise it directly
Time on page is easy to inflate and easy to misread. A checkout step with rising engagement time is getting harder to use, not more engaging.
Segment by source
Search traffic typically reads longer than social traffic on the same page. A site-wide average blends the two into something that describes neither.
How mrkr measures it
mrkr's tracker accumulates visible, active time per page and flushes it on visibility change and on unload, so the last page of a session is measured like every other one. The dashboard reports the median rather than the mean.
It is collected without a cookie in mrkr's default mode: the duration belongs to the pageview, not to a persistent identity attached to the visitor.
Engagement time is also what makes bounce rate readable again. A high bounce rate with a long median engagement time is a reference page working exactly as intended.
FAQ
Why is my average time on page zero for some pages?
Because every session that viewed the page ended there. Classic time on page needs a following pageview to subtract from, so an exit page has no measurable duration and reports zero. Engagement time, which samples while the tab is visible, does not have this problem.
What is the difference between time on page and session duration?
Time on page covers one page. Session duration covers the whole visit, from the first pageview to the last recorded interaction. Session duration inherits the same final-page blind spot when it is calculated from pageview timestamps alone.
What is a good average time on page?
It scales with the content. Thirty to sixty seconds is normal for a short landing page, two to four minutes for a long article that people genuinely read. Compare against the page's own reading time and against its own trend rather than a cross-industry average.
Start with one line of HTML.Your first visitors show up within a minute.