Visitor identity
Helpway tracks a returning visitor so their conversation history follows them.
How it works #
Two layers, with cookie > header priority:
- An
hw_visitorcookie (HttpOnly in production), set by the server. - An
X-Visitor-Idheader backed bylocalStorage, 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.