Home > widget-integration > PerformanceTrackerOptions

PerformanceTrackerOptions interface

Configuration options for performance tracking

Signature:

export interface PerformanceTrackerOptions 

Properties

Property

Modifiers

Type

Description

collectInterval?

number

(Optional) Interval for collecting metrics (milliseconds)

enabled?

boolean

(Optional) Enable/disable performance tracking

enableLogging?

boolean

(Optional) Enable console logging of performance data

maxMeasurements?

number

(Optional) Maximum number of measurements to keep in memory

onMetricsUpdate?

(metrics: PerformanceMetrics) => void

(Optional) Custom function to handle performance data

trackBlocking?

boolean

(Optional) Automatically track main thread blocking

trackJavaScript?

boolean

(Optional) Automatically track JavaScript execution time

trackMemory?

boolean

(Optional) Automatically track memory usage

trackRendering?

boolean

(Optional) Automatically track rendering performance (FPS).

Opt-in only. FPS tracking drives a self-rescheduling requestAnimationFrame loop, which forces the browser to produce a frame every ~16ms for as long as the tracker is active. On a storefront that keeps the main thread awake and makes auditing tools (Lighthouse/PageSpeed) attribute every frame's Layerize/PrePaint/Commit/IntersectionObserver work to the script that requested the frame. Enable it in debug sessions only.

false