Anonymous user tracking
The first time the widget needs a reader id, it creates a random one, such asanon_k3j9x2mq…, and keeps it in the browser’s localStorage under kl:anon. It is not a cookie, so it is not sent to your servers with page requests.
- It identifies a browser, not a person, and holds nothing about the reader.
- It lasts across reloads and visits until the reader clears their site data.
- The Support Form Deflector on the same site uses the same id, so a reader who asks the assistant and then files a ticket counts once.
- If the browser blocks storage, no id is sent.
Disabling user tracking
Fingerprint tracking
fp_1x9k2p, from the browser’s user agent, language, timezone and screen size. It survives cleared site data, and two readers with identical setups can share it. When on, it is used instead of the stored id. It is still a fingerprint, so check your privacy policy before turning it on.
Identifying signed-in readers
When your site knows who the reader is, pass their id and email, and every question is attributed to them. A signed-in reader always wins over the anonymous id and the fingerprint.window.keluSettings is read once, when the script tag sets up the widget, so set it before the tag. If you call KeluWidget.init() yourself, pass user: { id, email } there. When both are present, data-user-id and data-user-email win. kapa’s metadata object (company, name) is not sent.
Consent prompt
data-user-id, setUser()) is used as given.
Accepting is remembered in localStorage per knowledge base. Declining closes the panel, and the screen shows again next time. The wording is under Consent screen.
To use your own consent banner instead, load the widget with data-render-on-load="false" and call KeluWidget.render() once the banner is accepted.
What the widget stores in the browser
| Key | Storage | Holds | Cleared |
|---|---|---|---|
kl:anon | localStorage | The anonymous reader id | By the reader |
kl:consent:<knowledge base id> | localStorage | yes once consent is given | By the reader |
kl:expanded:<knowledge base id> | localStorage | Whether the reader left the panel expanded | By the reader |
kl:chat:<widget or knowledge base id> | sessionStorage | The conversation, so it survives page changes | When the tab closes. Not written with data-persist="none" |
Reference
| Attribute | Default | What it does |
|---|---|---|
data-user-analytics-cookie-enabled | true | false sends no stored id and no “opened” report |
data-user-analytics-fingerprint-enabled | false | Build the id from the browser instead of storing one |
data-user-id | Your own id for a signed-in reader | |
data-user-email | The signed-in reader’s email | |
data-consent-required | false | Ask for consent before anything is sent |
data-persist | session | none keeps the conversation in memory only |
data-user-id and data-user-email, so one reader is one reader on both.