Delayed-event service · enriched Page Viewed POC

One page view. Completed later.

The SDK sends the original Page Viewed to Amplitude’s heartbeat service. Heartbeats update that pending event; when the page ends or expires, the service adds engaged_time_seconds to the same event and forwards it to ingestion.

in-browser simulation · not an SDK integrationone Page Viewed event5s activity window15s snapshots3m inactivity finalization
Start here · the idea in 20 seconds

Measure attention, then finish the original event.

Today, Page Viewed is normally sent immediately—before its engaged time is known. This POC proposes briefly holding that event in an Amplitude heartbeat service, updating one property over time, and sending the completed event to ingestion.

1A visit starts

The browser creates one Page Viewed event. The service holds it instead of sending it to Amplitude yet.

2Attention accumulates

Recent input counts as engaged time. Heartbeats update the same pending record; they are not analytics events.

3The visit ends

Navigation or expiry finalizes the record. Amplitude receives one Page Viewed with the final duration attached.

Reach proposal · simulation defaults

Four timings, three different jobs

SettingDefaultConfigurable?What it does
Engagement activity window5 secondsYes, requested; default proposedRecent activity keeps the attention clock running. When the window closes, engaged time pauses; blur or a hidden tab pauses it immediately.
Snapshot heartbeat15 secondsYes, proposed SDK optionUpdates the same pending Page Viewed with cumulative engaged time. Reach wants this cadence; they have not specifically requested a cadence control.
Client inactivity finalization3 minutesYes, confirmed by ReachMeasured from the last qualifying engagement. A running SDK finalizes the page; heartbeat requests never reset this deadline.
Service fallback timeout3 minutesInternal setting, aligned with clientMeasured from the last accepted snapshot when the SDK cannot finalize. It is a separate timer, not a second customer-facing option.

The 5-second window pauses counting; the 3-minute inactivity timer ends the logical page view. The service timeout protects the latest stored snapshot if the browser stops running. This POC simulates all three behaviors in-browser. Timing decision ↗ · Reach confirmation ↗

Follow the live proposal

See the full lifecycle in five steps

Current · Step 1

01 · Look at the Browser SDK clockLet attention expire

Stop interacting for five seconds. The activity window reaches zero and engaged time pauses.

02 · Look at Browser attentionScroll to re-engage

Scroll anywhere on the page. The tracker returns to ENGAGED and the five-second window restarts.

03 · Look at the Amplitude heartbeat serviceSend the next snapshot

Send a snapshot now. Normally the 15-second cadence replaces the pending Page Viewed with its latest cumulative engaged time.

04 · Choose one endingNavigate—or remain inactive

Choose navigation, the running client's 3-minute inactivity timer, or the service fallback after browser suspension.

05 · Compare the old and new viewsOne finalized + one new

Navigation starts Article B immediately. After inactivity, simulate returning to Article A after the 3-minute boundary.

At Step 4, choose one completion path.

Live state of this simulated page visit

These values update in your browser only

ENGAGEDIs the user active right now?
0.0sCumulative active-attention time
PENDINGHolds the event until the visit ends
15.0sChartbeat-aligned active cadence
3m 00sReset by activity—not heartbeat traffic

1 · What happens in the browser

Article A
5.0
activity window remaining

Mouse, scroll, click, touch, keyboard, load, and focus renew a five-second activity window. This simulation snapshots every 15 seconds. The separate three-minute client inactivity deadline resets only on qualifying activity; heartbeat traffic must not keep an inactive page alive.

2 · Amplitude heartbeat service

1 pending event
Page Viewed
buffered
Heartbeats
update
Page Viewed
forwarded
Page ViewedPENDING · NOT IN INGESTION YET
Waiting for finalization

This is one event, shown as one record. The ID identifies the Page Viewed; engaged_time_seconds is a field updated on it. Heartbeats do not create additional analytics events.

Heartbeat service update history

1 service update
atpageoperationtriggerengaged so farsnapshot

3 · Amplitude ingestion service

final destination

One logical Page View exists and is still pending.

pageeventproperty
PATH A · NAVIGATION

The page ends explicitly

On pagehide/beforeunload, the SDK attempts one final cumulative snapshot and asks the service to finalize immediately. Delivery is not guaranteed. Chartbeat reports about 68% success for its combined unload mechanisms. For same-site navigation, Chartbeat stores the previous pinger state on the client for up to an hour and can resend it when another page on the domain loads Chartbeat. Whether the Amplitude SDK should add that client-side handoff remains an open design question. Chartbeat methodology ↗

PATH B · CLIENT INACTIVITY

The page remains open but inactive

After three minutes without qualifying engagement, the running client sends a final snapshot and finalizes the Page Viewed. Heartbeat traffic does not reset this clock. Returning after that boundary creates a new logical Page View, even at the same URL.

PATH C · SERVICE FALLBACK

The SDK stops before it can finalize

If browser timers are suspended, the service timeout becomes due three minutes after the last accepted snapshot and forwards that stored value. This may lose the unreported tail. Actual DynamoDB TTL deletion and ingestion can take longer; three minutes is not a delivery guarantee.

Proposed data path

Delay and enrich the original event

① Browser SDK

Sends Page Viewed once to the heartbeat service, then sends engagement heartbeats carrying the current cumulative duration.

→
② Amplitude heartbeat service

Holds the original event and updates its pending engaged-time property. Navigation, client inactivity, or the separate service timeout finalizes it.

→
③ Amplitude ingestion service

Receives that same Page Viewed event with engaged_time_seconds attached. No separate engaged-time event.

What this proposal buys

A single canonical Page Viewed event, final engaged time attached to the correct page, active-attention semantics, and final-page recovery from the latest stored snapshot.

Unresolved product costs

Open Page Viewed events are absent from ordinary queries, funnels, and session construction. Production work still needs ordering, BFCache, suspension, offline, multi-tab, shared-heartbeat, and first-class metric decisions.