Pass Identity & Context
Send the right identifiers before opening a flow so responses land in the right place.
- Last reviewed
Pass Identity & Context
Identity is how feedback stays attached to the right user, device, or session.
Widget installs
Use identify() before opening a flow when your product already knows the user.
await client.identify("user_123", {
email: "user@example.com",
plan: "pro",
});
If you do not have a stable user ID yet, traits-only mode also works:
await client.identify({
email: "user@example.com",
});
Call reset() on logout so old identity and auth state do not leak into the
next session.
Hosted embeds
Embeds pass identity through query parameters on the URL:
user_idanonymous_idemailphoneadvertising_iddevice_iddevice_token
Example:
/embed/YOUR_API_KEY/SURVEY_ID/dark?user_id=user_123&email=user%40example.com
Current limitation
There is no public navigate or updatePage command in the protocol today. Do
not build your integration around private host-context bridges. For widget
installs, let the runtime observe browser state; for embeds, reissue the URL
with the context you need.