Choosing a Tracking Mode

The Pageviews module records member reading in one of three modes. They differ in one question: how precisely do you need to know how long someone stayed on the page? This page explains what each mode records, how it records it, and what it costs, so you can pick without over-buying.

Simple

Every time a member opens a page, one row is written: who, which page, when. Nothing else happens. No exit signal, no pings.

Simple answers the two questions most membership sites ask: which content gets read, and by whom. Course stall points, dead sections, the member who stopped reading before they cancelled; all of that is visible from rows that say "this member opened this page at this time." It is also the cheapest mode: one INSERT per page load and nothing more.

That is the recommended default. Start here.

With Duration

On top of the open record, the member's browser sends one signal when they leave the page: navigating away, closing the tab, switching to another tab, or hiding the browser window. The row gets an ended-at time, and the difference between started and ended is the reading time you see in the log.

The signal is sent with the browser's beacon API, which is designed to survive the page going away. But it is an estimate, not a measurement. It records when the browser said goodbye, not when the member stopped reading: a page left open in a background tab ends when the tab is hidden, and a browser that crashes or loses connectivity sends no signal at all. Rows with no ended-at time in this mode mean exactly that: the end was never observed.

Choose With Duration when you want to report on reading time or engagement, and accept that some rows will have no duration at all.

With Heartbeat

The missing end signals are the weakness of With Duration, and heartbeat is the fix. While the page stays open, the member's browser sends a ping at a fixed interval, and each ping updates the row's last-heartbeat time. If the end signal never arrives, the last heartbeat marks the high-water mark of the session: the member was still reading at that moment.

Pings pause while the tab is hidden, so an abandoned-but-open tab does not accumulate reading time. The interval is your call, from 30 seconds to an hour, with five minutes the default. Shorter intervals sharpen the high-water mark and load the server harder; anything under a minute is rarely worth the traffic. A busy membership site with thousands of concurrent readers should think carefully before going below the default, because every open tab is a small recurring request stream.

Choose With Heartbeat when reading time is a number you act on: compliance-style content where dwell time matters, or engagement reporting that has to survive mobile browsers closing pages without ceremony.

What no mode does

None of the modes track anonymous visitors. The tracking script only loads for logged-in members, and administrators and editors are excluded entirely, so your own editing never pollutes the data. Archives, search results, and error pages are not tracked either; the module records pages, not every URL a member touches.

For anything the modes do not cover, the page views log is where the recorded data lives, and retention there is a setting you control.