Data storage
The VivoChat widget uses the browser’s localStorage to store the chat state and user data.
What data is stored
Section titled “What data is stored”| Key | Description | Retention period |
|---|---|---|
<WIDGET_ID>_vivoClientId |
Anonymous customer identifier for restoring dialog history. <WIDGET_ID> is substituted automatically to isolate data between different widgets on the same domain. |
Until localStorage is cleared or the token is changed via setUserToken() |
vivoUserToken |
User token from setUserToken(). Used to verify the customer when starting a session. |
Until setUserToken(null) is called or localStorage is cleared |
vivoOpenState |
Chat window state: open or closed. Used to synchronize between browser tabs. | Until onUnmount() is called |
vivoIsNotFirstOpen |
Flag for the first opening of the widget. Used to synchronize state between tabs. | Until localStorage is cleared |
vivoUnreadCount |
Number of unread messages. Used to display the badge and the message counter. | Until localStorage is cleared |