Skip to content

VisitorStorage

Where a consumer persists the visitor token across visits, if at all. The package never touches browser storage itself. See VisitorSession in ./visitor.js for exactly when each method is called.

get(): string | Promise<string | null | undefined> | null | undefined

string | Promise<string | null | undefined> | null | undefined


remove(): void | Promise<void>

Called when recognition is denied or withdrawn, on forget, and when the API says nothing about consent.

void | Promise<void>


set(token): void | Promise<void>

Called only when the API reports recognition as granted, and only when the token changed.

string

void | Promise<void>