Clicktag time on page guide
Time on page: what it measures and how to track it free
Clicktag tracks free time on page as the median of pageview durations of 5 seconds or more. You get one 4 KB script, no cookies, no credit card, and up to 50 websites per account, without skewed averages from idle tabs.
Time on page measures how long visitors spend reading or interacting with a specific URL before leaving. Analytics tools calculate it in different ways: Universal Analytics needed a second pageview to timestamp the exit, Google Analytics 4 (GA4) reports average engagement time instead, and Clicktag takes the median of pageview durations of 5 seconds or more. Because a few open tabs can skew a simple average, a median gives a truer reading of how long people actually spend on your content.
How three analytics tools measure time on page
When someone asks for "average time on page" or "average session duration," the number they get depends entirely on the tracker running on the site. Two tools looking at the exact same traffic can report different numbers because they start and stop the clock differently.
Universal Analytics (which stopped processing hits on July 1, 2023, and shut down access the week of July 1, 2024) measured time by subtracting the timestamp of one pageview from the timestamp of the next pageview. If a visitor read an article for ten minutes and closed the tab, there was no next pageview to timestamp, so that last page counted as zero seconds.
Google Analytics 4 has no time on page metric. It replaced that model with "Average engagement time." GA4 tracks the time your website is in focus in the user's browser and divides the total engagement duration by the number of active users. It also defines an engaged session as one that lasts longer than 10 seconds, has a key event, or has 2 or more page or screen views.
Clicktag sums legitimate duration increments for each canonical human pageview, drops anything under 5 seconds, and reports the median of the remaining durations. It does this with one 4 KB script and sets no cookies.
| Tool | Metric name | Calculation method | Threshold or session rule | Price |
|---|---|---|---|---|
| Clicktag | Time on page (avg_duration_s in API) |
Median of summed durations per human pageview | Includes pageviews with a duration of 5 seconds or more | Free (up to 50 sites, no credit card) |
| Universal Analytics (shut down) | Time on page / Session duration | Timestamp difference between consecutive pageviews | Last page of each visit counted as 0 seconds | Shut down July 2023 / July 2024 |
| Google Analytics 4 | Average engagement time | Total time the website was in focus divided by active users | Engaged session requires >10 seconds, a key event, or 2+ views | Free standard tier (360 requires contract) |
Prices and limits checked on October 29, 2026, on each vendor's official pricing or help pages.
Why a median beats an average for page duration
Web browsing durations do not follow a neat bell curve. Many visitors scan a page quickly, while a small handful leave the tab open in the background or keep a reference doc in focus while they work on a second monitor.
A single visitor who leaves a page open for half an hour pulls an arithmetic average up for dozens of normal readers, while the median hardly moves.
In Clicktag, two rules keep the number grounded in actual reading behavior:
- A 5-second floor: Clicktag only includes pageviews with a summed duration of 5 seconds or more. Accidental clicks and instant back-button exits don't drag the number down to two seconds.
- The median instead of the mean: Clicktag orders the eligible pageview durations and picks the middle value. Even in the Stats API, where the JSON field is named
avg_duration_sfor compatibility, the value returned is the median, not an arithmetic mean.
If a time bucket has no human pageviews reaching the 5-second mark, Clicktag returns null rather than a misleading zero.
What is a good time on page
There is no universal benchmark across the whole web because different pages have different jobs. A pricing page, a changelog, and a long tutorial shouldn't be judged by the same clock.
Instead of comparing your sitewide number against an industry average, group your own URLs by what they do and compare them against each other:
- Long-form guides and blog posts: Check blog analytics by filtering your report to one post at a time. If most posts hold readers for two minutes and one drops to 15 seconds, the intro or headline on that post likely doesn't match what the reader searched for.
- Landing pages and product pages: Shorter durations are fine here if people are moving forward. Pair your page duration with goal tracking to see whether visitors are actually clicking your signup button or reaching the next step.
- Documentation and reference pages: A developer copying a snippet might only need 15 seconds. Check your site's weekly retention cohorts to see whether people come back, rather than worrying about a short single visit.
How to use time on page with filters and goals
Time on page becomes much more useful when you slice it by where visitors came from and where they landed. In Clicktag, you can apply up to 12 filters at once on your reports to isolate specific segments.
- Filter by traffic source: Compare visitors from
google.comwith visitors fromchatgpt.com(ChatGPT addsutm_source=chatgpt.comto links it displays, and Clicktag readsutm_sourcefirst). You might find that visitors coming from an AI assistant spend more time reading than casual searchers, or that they jump straight to the action. - Check landing pages: Filter by a specific landing page to see how long people stay on it, and compare that with your previous period (such as the last 7 days vs the 7 days before).
- Pair with goals and funnels: Clicktag lets you set up to 50 goals per site, including 2-to-6-step funnels completed on the same UTC day. Funnel reports show the median and p90 time to convert alongside your conversion rate, so you can see both how long people read a page and how long the whole signup flow takes.
If you want to see how the numbers look on a live interface before installing anything, open the live demo, which runs on synthetic sample data.
Reading time on page from the Clicktag Stats API
If you build your own internal dashboards or run automated reporting scripts, you can fetch your site's median time on page over HTTPS using the Stats API. The /api/sites/{hostname}/overview endpoint returns totals.avg_duration_s for the full range, previous.avg_duration_s for the comparison window, and duration_s inside each hourly or daily series bucket.
You can query up to 400 days at once, and you can pass f= filter parameters (like f=page:/pricing or f=referrer:google.com) to get the median duration for a single URL or traffic source. Here is how to read the overview for the public demo site using curl:
curl --fail-with-body --silent --show-error --max-time 20 \
'https://clicktag.io/api/sites/demo.bitgate.dev/overview?tz=UTC'
And the response structure includes the duration fields in seconds:
{
"totals": {
"pageviews": 3,
"visitors": 2,
"avg_duration_s": 42,
"avg_scroll": 75
},
"previous": {
"pageviews": 2,
"visitors": 2,
"avg_duration_s": 30,
"avg_scroll": 50
},
"series": [
{ "t": 1789516800, "pageviews": 1, "visitors": 1, "duration_s": 36, "scrolled": 80 },
{ "t": 1789520400, "pageviews": 2, "visitors": 1, "duration_s": 48, "scrolled": 70 }
],
"forecast": {
"bucket": 1789520400,
"pageviews": 4,
"visitors": 2,
"basis": "elapsed",
"elapsed": 0.5
},
"live": 0,
"granularity": "hour",
"previous_range": { "from": 1789430400, "to": 1789435800 }
}
For private sites, pass your Firebase ID token or a management key (tt_mk_) with the read scope in the Authorization: Bearer header.
FAQ
How does Clicktag calculate time on page?
Clicktag sums the legitimate duration increments for each canonical human pageview and takes the median of all pageviews that lasted 5 seconds or more. Pageviews under 5 seconds and bot hits are excluded. If a time range has no pageviews of at least 5 seconds, the metric returns null.
Why does the Stats API field say avg_duration_s if it is a median?
The API field is named avg_duration_s in the JSON overview response for API compatibility, but the number it returns is the median duration of pageviews of 5 seconds or more, not an arithmetic mean. Each time bucket in the series array also reports its median duration as duration_s.
Does Clicktag track bounce rate or scroll depth?
Scroll depth yes, bounce rate no. The dashboard shows an Avg. scroll card next to time on page: the average of each page's deepest scroll, in percent. Clicktag does not report bounce rate or offer session recordings or heatmaps, so you measure engagement through median time on page, average scroll, custom events, and up to 50 goals or funnels per site.
How is GA4 average engagement time different from Universal Analytics time on page?
Universal Analytics calculated time by subtracting timestamps between consecutive pageviews, so the last page of a visit counted as zero seconds, and so did single-page sessions with no further interaction. GA4 has no time on page metric: it measures the time your site is in focus in the visitor's browser and divides that total by the number of active users.
Does Clicktag use cookies to track how long a visitor stays on a page?
No. Clicktag uses no cookies and no local storage, and it never stores IP addresses. Engagement updates are linked to the parent pageview and attributed to that pageview's timestamp, while daily visitors are counted using a daily salted SHA-256 hash whose salt is deleted shortly after each UTC day ends.
Updated October 30, 2026