Blog

Measuring INP without cookies

Interaction to Next Paint is a per-page-view number. Here is how we report it without ever recognising a returning visitor.

Interaction to Next Paint (INP) became a Core Web Vital in 2024, and it is the metric our customers ask about most. It is also the one that tempts analytics tools into tracking: to see how a visitor's experience changes over a session, the easy way is a persistent identifier.

We do not need one. The browser already gives the script everything required through the Event Timing API: every interaction has an identifier, a duration and a target. The script keeps the slowest interaction seen during the page view and sends it once, when the page is hidden.

new PerformanceObserver(list => { /* keep the longest interaction */ })
  .observe({ type: "event", buffered: true, durationThreshold: 40 })

The result is one INP value per page view. Percentiles are computed across page views, not across people, which is also what Google's field data does. A visitor who opens ten pages contributes ten values; we never learn that they are the same person.

In v3.14 we added attribution: the report now names the element that received the slowest interaction, so a regression can be traced to a button rather than to a page.

← All articles