What is time on page?
Time on page measures how long a visitor spent on a page. How it is calculated, why it cannot measure the last page of a session, and what fixes that.
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.
The 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.
This is why average time on page is systematically biased: it silently excludes every exit, which includes every bounce, which is often the majority of sessions on a content page.
A 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.

See it on real data
The live demo is a fully populated dashboard with real demo traffic. No signup and no card required.
Open the live demoUsing it well
Pair it with scroll depth
Long time and shallow scroll means confusion or a slow load. Long time and deep scroll means a genuine read. Neither number is conclusive alone.
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.
Questions, answered.
Related terms.
- What is engagement rate?
Engagement rate is the share of sessions that met a defined engagement threshold rather than leaving immediately.
- What is bounce rate?
Bounce rate is the share of sessions that end without a second interaction: one page loads, nothing else is recorded, and the visitor leaves.
- What is pageview?
A pageview is a single recorded view of a page on your site.
- What is session?
A session is one continuous visit to a site: a group of pageviews and events from the same visitor with no long gap between them.
- What is core web vitals?
Core Web Vitals are three metrics Google uses to measure page experience: Largest Contentful Paint for loading, Interaction to Next Paint for responsiveness, and Cumulative Layout Shift for visual stability.
Where this shows up in Mrkr
- See median engagement time per page in the live demo
Engagement time and scroll depth on real demo traffic.
- Browse the full analytics glossary
Every metric, method and privacy term, defined in one place.
Your first visitor is already here.
Drop in the script and watch them land. It takes about a minute.