PerformanceEventTiming: interactionId property

Baseline 2025
Newly available

Since December 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

The read-only interactionId property of the PerformanceEventTiming interface returns an ID that uniquely identifies a user interaction which triggered a series of associated events.

Value

A number. For event types where an interaction ID is not calculated the value is 0.

Description

When a user interacts with a web page, a user interaction (for example a click) usually triggers a sequence of events, such as pointerdown, pointerup, and click events. To measure the latency of this series of events, the events share the same interactionId.

An interactionId is only computed for the following event types belonging to a user interaction. It is 0 otherwise.

Event types User interaction
pointerdown, pointerup, click click / tap / drag
keydown, keyup key press

The interactionId is also needed to calculate the Interaction to next paint metric, which helps analyze responsiveness to user interaction over the lifetime of a page.

Examples

Using interactionId

The following example collects event duration for all events corresponding to an interaction. The eventLatencies map can then be used to find events with maximum duration for a user interaction, for example.

js
// The key is the interaction ID.
let eventLatencies = {};

const observer = new PerformanceObserver((list) => {
  list.getEntries().forEach((entry) => {
    if (entry.interactionId > 0) {
      const interactionId = entry.interactionId;
      if (!eventLatencies.has(interactionId)) {
        eventLatencies[interactionId] = [];
      }
      eventLatencies[interactionId].push(entry.duration);
    }
  });
});

observer.observe({ type: "event", buffered: true });

// Log events with maximum event duration for a user interaction
Object.entries(eventLatencies).forEach(([k, v]) => {
  console.log(Math.max(...v));
});

Specifications

Specification
Event Timing API
# dom-performanceeventtiming-interactionid

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
interactionId
Chrome – Full support
Chrome 96 (Release date: 2021-11-15)
footnote Full support
Edge – Full support
Edge 96 (Release date: 2021-11-19)
footnote Full support
Firefox – Full support
Firefox 144 (Release date: 2025-10-14)
footnote Full support
Opera – Full support
Opera 82 (Release date: 2021-12-02)
footnote Full support
Safari – Full support
Safari 26.2 (Release date: 2025-12-12)
footnote Full support
Chrome Android – Full support
Chrome Android 96 (Release date: 2021-11-15)
footnote Full support
Firefox for Android – Full support
Firefox for Android 144 (Release date: 2025-10-14)
footnote Full support
Opera Android – Full support
Opera Android 67 (Release date: 2022-01-31)
footnote Full support
Safari on iOS – Full support
Safari on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
Samsung Internet – Full support
Samsung Internet 17 (Release date: 2022-05-04)
footnote Full support
WebView Android – Full support
WebView Android 96 (Release date: 2021-11-15)
footnote Full support
WebView on iOS – Full support
WebView on iOS 26.2 (Release date: 2025-12-12)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support