consent option, the SDK runs with its configured defaults. To wait for a visitor’s choice before starting analytics or replay, pass false to init():
instrumentation-client.ts
init from @interfere/vite/init in the browser entry point.
Set this before React renders. Passing consent only to the provider leaves a gap between initialization and the first render.
Consent describes what the visitor allows right now. The same values work in init(), the provider’s consent prop, and consent.set():
Update consent
ImportuseInterfere from @interfere/next/provider or @interfere/vite/provider. Update the decision when the visitor accepts, declines, or changes their preferences:
consent.set(false) to withdraw both permissions, or pass an object for separate choices:
consent prop preserves the decision supplied to init() or updated at runtime. Calling consent.set() without a value removes consent restrictions; it does not record the visitor’s acceptance.
Consent controls analytics and replay. It does not disable errors, logs, tracing, or session
storage, and granting consent does not enable plugins disabled in configuration.