@uservane/browser: UserVane
Variable: UserVane
Section titled “Variable: UserVane”
constUserVane:object
Defined in: index.d.ts:344
@uservane/browser - UserVane in-product survey widget SDK.
Public API is queued, idempotent, and SSR-safe. Errors inside UserVane never propagate to the host application.
import { UserVane } from "@uservane/browser";UserVane.init({ key: "uv_pk_live_…" });UserVane.identify({ userId: "u_123", traits: { plan: "pro" } });UserVane.survey("nps-q1");Type Declaration
Section titled “Type Declaration”identify
Section titled “identify”
readonlyidentify: (options) =>void
Identify the current respondent. Repeatable (traits merge/update). Safe before or after init; triggers re-evaluation of buffered surveys.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”void
readonlyinit: (options) =>void
Initialize the SDK. Queued and idempotent. Defers network work to idle. Safe to call during SSR (no-ops DOM work).
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”void
survey
Section titled “survey”
readonlysurvey: (slug) =>void
Imperative survey trigger by slug. If rules are not loaded yet, the trigger is buffered and evaluated once loaded. Never drops a survey because identify/init ordering lagged.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void