IrisConfig
The configuration object passed tonew Iris(config).
The base URL of your self-hosted Iris backend server. No trailing slash.
A unique identifier for this website or project. Used to logically group events from the same site. Stored in every event payload as the
s field.Controls which events are tracked automatically. Pass
false (default) to disable all autocapture, or pass an AutocaptureConfig object to enable specific features.Enables verbose console logging. When
true, Iris logs each event as it is sent or queued, and logs errors from failed network requests.Optional batching configuration. When omitted, every event fires an immediate HTTP request. See Event Batching for details.
AutocaptureConfig
When
true, fires a $pageview event on start(), patches history.pushState for SPA navigation, and listens to popstate for back/forward navigation.When
true, attaches a global click listener that automatically records $click events on button, a, input[type="submit"], and [role="button"] elements. Elements with the .iris-ignore CSS class are skipped. input[type="password"] is always excluded.When
true, hooks into the web-vitals library to automatically send $web_vital events for LCP, INP, and CLS.BatchConfig
The number of events to queue before triggering a flush. When the queue reaches this size, all queued events are sent immediately in a single
POST /api/events request.The interval in milliseconds between automatic flushes. A
setInterval timer runs at this cadence and sends any queued events.When
true, queued events are flushed when the user switches tabs (visibilitychange) or navigates away (pagehide). Uses navigator.sendBeacon for reliable delivery on page unload.