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.
Properties
Section titled “Properties”consent
Section titled “consent”
readonlyconsent:ConsentState|null
The consent state from the last answer, or null.
readonlyready:Promise<void>
Resolves once a token kept from an earlier visit has been read.
readonlytoken:string|null
The current token, or null before the first answer and after the device has been forgotten.
Methods
Section titled “Methods”adopt()
Section titled “adopt()”adopt(
session):Promise<void>
Takes over a token and consent state another part of ebitex issued for this visitor.
Parameters
Section titled “Parameters”session
Section titled “session”consent
Section titled “consent”ConsentState | null
visitor
Section titled “visitor”string
Returns
Section titled “Returns”Promise<void>
consentSignals()
Section titled “consentSignals()”consentSignals():
object
The consent signals sent with every request right now.
Returns
Section titled “Returns”object
cmp:
"granted"|"denied"|null
cmpString
Section titled “cmpString”cmpString:
string|null
dnt:
boolean
gpc:
boolean
forget()
Section titled “forget()”forget():
Promise<string|null>
Forgets this device everywhere.
Returns
Section titled “Returns”Promise<string | null>
setConsent()
Section titled “setConsent()”setConsent(
options):Promise<unknown>
Replaces the consent signals and asks ebitex again.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<unknown>