Next.js strips the router-internal headers (RSC, next-router-prefetch)
before the request proxy runs, so prefetch detection based on them never
fired: link prefetches were counted as page views. A page view is now a
browser navigation, identified by the standard sec-fetch-dest: document
header, which survives into the proxy. Prefetch payloads, subresource
fetches and metadata-less clients are skipped as non-navigation
requests.
Umami never received data: the client-side path (browser beacon to
/stats/api/send) has been dead in production. Pageviews are now
classified and recorded entirely on the server in the request proxy;
no tracking script ships to the browser anymore.
- Pure domain decision (decidePageview) filters real page views from
assets, infrastructure paths, prefetches and bot user agents
- Pure payload builder maps facts onto the Umami send contract as an
unnamed event, with the client identity travelling in headers
- proxy.ts wires request facts into the domain and fires the send
without delaying the response; configured via UMAMI_WEBSITE_ID and
UMAMI_API_ENDPOINT
- Removes the dead client analytics stack (components, adapters,
/stats proxy route) and its layout mount