ChatShipper Webwidget Cookie Specification

Updated 1 month ago by Joost Rijlaarsdam

Local storage usage

In Chatshipper domain maintained by Chatshipper:

Local storage is being used to restore state on page navigation. Local storage is remembered for 30 minutes before being reset.

Local storage setting

Type

Explanation

widget_auto_opened

timestamp

The timestamp at which the widget was automatically opened to get attention. influenced with the openAfter setting.

widget_loaded

timestamp

This is the moment the widget was loaded. Used to determine autoOpen moment

widget_closed_by_customer

boolean

Used to restore widget state after navigating to different page

widget_opened_by_customer

boolean

Used to restore widget state after navigating to different page

widget_customer_clicked_header

boolean

Used to restore widget state after navigating to different page

widget_eyecatcher_closed

timestamp

A flag to tell the system the eyeCatcher is closed

widget_uuid

string

User id (anonimized) used to distinguish different users

In Chatshipper domain maintained by Smooch (now Sunshine Conversations Zendesk):

By default, the identity of anonymous users is stored in the localStorage of the browser.

Using the localStorage will persist the user identity through out browser sessions (including page reloads and browser restarts).

In other words: These local storage elements are persistent, they will remain in the Local Storage until removed by the user.

Local storage setting

Type

Explanation

.appUserId</id>

string

is used to identify which user is currently active in the browser session

.sessionToken

string

is a single value used for negotiating authentication once a Web Messenger session begins - as this is set in LocalStorage it does not have an expiry like a cookie does.

.clientId

string

is set (anonymous) when the Web Messenger finishes initializing on a web page.

Alternative: Browser storage

To clear the user identity once the browser is closed, use sessionStorage instead. Learn more

Supported by the Smooch.init method.

Smooch.init({
integrationId: '<integration-id>',
browserStorage: 'sessionStorage' // Add this line to your 'Smooch.init' call}).then(
function () {
// Your code after init is complete
},
function (err) {
// Something went wrong during initialization
});

The downside of this method is that returning users of the webwidget can not be recognized, nor can their prior conversation be loaded. In fact on every interaction they will be seen as new user. In our opinion this is a lessere Customer experience and therefore not recommended.


How did we do?