Skip to content

SharedVisitors

What sharedVisitorSession needs from the visitor object your page already has. The Visitors object that createVisitors returns in @ebitex/visitors-sdk has exactly this shape, so you pass it straight in; this package does not import that one, and a page that does not use it never needs it.

readonly consent: ConsentState | null

The consent state from the last answer, or null.


readonly ready: Promise<void>

Resolves once a token kept from an earlier visit has been read.


readonly token: string | null

The current token, or null before the first answer and after the device has been forgotten.

adopt(session): Promise<void>

Takes over a token and consent state another part of ebitex issued for this visitor.

ConsentState | null

string

Promise<void>


consentSignals(): object

The consent signals sent with every request right now.

object

cmp: "granted" | "denied" | null

cmpString: string | null

dnt: boolean

gpc: boolean


forget(): Promise<string | null>

Forgets this device everywhere.

Promise<string | null>


setConsent(options): Promise<unknown>

Replaces the consent signals and asks ebitex again.

ConsentOptions

Promise<unknown>