Contact emails
mmo...@google.com
Specification
https://www.w3.org/TR/event-timing/#dom-performance-interactioncount
Design docs
No information providedhttps://www.w3.org/TR/event-timing/#dom-performance-interactioncounthttps://www.w3.org/TR/event-timing/#sec-increasing-interaction-count
Summary
The Event Timing API is part of the Performance Timeline and is used to measure the performance of user interactions. Certain Events will have an interactionId value assigned to them, and this is useful for grouping related interactions based on common physical user inputs or gestures.
This feature adds a very trivial performance.interactionCount, which is just the total number of interactions that have occured on the page.
In particular, this feature is useful for computing the Interaction to Next Paint (INP) metric value, which requires knowing the total number of interactions in order to compute a high percentile score (p98 for pages with greater than 50 total interactions).
This feature has been specced for a long while, was prototypes in Chromium a long time ago but never shipped, is part of Interop 2025, and is already available in other browsers.
(Note: there is already a more powerful performance.eventCounts map for specific events, but it is not possible to accurately map event cunts to interaction counts.)
Blink component
Blink>PerformanceAPIs
Web Feature ID
event-timing
Risks
Interoperability and Compatibility
Other browser venders have already shipped this feature as part of the Interop 2025 effort for CWV INP.
The main interop risk is that there are existing polyfills for interactionCount in Chromium for INP calculation. However, popular polyfills (such as web-vitals.js) have long been tested to feature detect, given the long experimental web platform implementation in chromium.
Gecko: Shipped/Shipping (
https://groups.google.com/a/mozilla.org/g/dev-platform/c/xvv6sxJZc4U/m/JzSSCoxPAgAJ?e=48417069)
WebKit: In development (
https://bugs.webkit.org/show_bug.cgi?id=297361)
Web developers: Strongly positive No specific link, but this feature is related to the very popular INP metric definition (and obviates the need for an imperfect polyfill for counting interactions).
Other signals:
WebView application risks
Does this intent deprecate or change behavior of existing APIs,
such that it has potentially high risk for Android WebView-based
applications?
n/a
Debuggability
DevTools has existing support for Interactions (real time performance monitor and tracing). Visualizing total interactionCount is not needed, but can be easily found (via literally counting the list of interactions, or just console logs).
Will this feature be supported on all six Blink platforms
(Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes
Yes
https://wpt.fyi/results/event-timing/
(several tests, look for interaction-count-*)
Flag name on about://flags
No information provided
Finch feature name
EventTimingInteractionCount
Requires code in //chrome?
False
Availability expectation
Feature is available on Web Platform Baseline within 12 months of launch in Chrome (as part of Interop 2025 for INP)
Adoption expectation
Polyfill already widely adopted (for INP calculation), and feature detection already used.
Estimated milestones
Shipping on desktop | 143 |
DevTrial on desktop | 111 |
Shipping on Android | 143 |
DevTrial on Android | 111 |
Shipping on WebView | 143 |
Anticipated spec changes
Open questions about a feature may be a source of future web compat or
interop issues. Please list open issues (e.g. links to known github
issues in the project for the feature specification) whose resolution
may introduce web compat/interop risk (e.g., changing to naming or
structure of the API in a non-backward-compatible way).
Already specced in Event Timing API.
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5153386492198912