Skip to content
On this page

Helpway tracks a returning visitor so their conversation history follows them.

How it works #

Two layers, with cookie > header priority:

  1. An hw_visitor cookie (HttpOnly in production), set by the server.
  2. An X-Visitor-Id header backed by localStorage, as a fallback when cookies are unavailable.

A returning visitor keeps their thread; a brand-new one gets a fresh identity.

Identifying logged-in users #

When you already know who the user is, pass their identity to the widget so conversations attach to the right contact:

TSX
<HelpwayWidget
  apiKey="pk_live_..."
  user={{ id: "u_123", email: "ada@acme.com", name: "Ada" }}
/>

Resetting identity #

To fully reset (e.g. on logout), clear both layers: remove the helpway:visitor-id localStorage entry and clear the hw_visitor cookie.