Skip to content

getOrCreateVisitorId

getOrCreateVisitorId(): string

The persistent visitor id the public submission endpoint uses to reconcile a respondent’s progress across steps.

It serves the same purpose as the visitor id ebitex’s own hosted form page keeps, implemented here so this package depends on nothing but React: its consumers are arbitrary external apps with their own bundlers and design systems.

Note the id is scoped to your site’s origin, not ebitex’s, because nothing here loads in an iframe. A respondent who fills the same form on two different sites is therefore two visitors.

Never throws. Storage access can fail outright under some privacy settings, and a form that refuses to render because it couldn’t save an id would be a far worse outcome than one that simply can’t reconcile progress.

string