Home > @uniformdev/context > VisitorDataStore

VisitorDataStore class

Signature:

Constructors

<table><thead><tr><th>

Constructor

</th><th>

Modifiers

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

(constructor)(options)

</td><td>

</td><td>

Constructs a new instance of the VisitorDataStore class

</td></tr> </tbody></table>

Properties

<table><thead><tr><th>

Property

</th><th>

Modifiers

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

data

</td><td>

readonly

</td><td>

VisitorData

</td><td>

Gets the current visitor data. This property is always up to date.

</td></tr> <tr><td>

decayEnabled

</td><td>

readonly

</td><td>

boolean

</td><td>

</td></tr> <tr><td>

events

</td><td>

readonly

</td><td>

{ on: { <Key extends keyof VisitorDataStoreEvents>): void; }; }

</td><td>

Subscribe to events from storage

</td></tr> <tr><td>

options

</td><td>

readonly

</td><td>

VisitorDataStoreOptions

</td><td>

</td></tr> </tbody></table>

Methods

<table><thead><tr><th>

Method

</th><th>

Modifiers

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

delete(fromAllDevices)

</td><td>

</td><td>

Deletes visitor data (forgetting them) In most cases you should use forget() on the Context instead of this function, which also clears the Context state.

</td></tr> <tr><td>

updateData(commands)

</td><td>

</td><td>

Push data update command(s) into the visitor data

</td></tr> </tbody></table>