Identify users
Tie widget submissions to signed-in users in your app.
Use this when your app already knows who the user is and you want feedback attributed to them — the same basic model as UserJot's uj.identify.
How it works
After a user signs in to your app, call ld.identify() from the browser with their profile fields. Landed stores that context and attaches it when they submit feedback.
Pass user fields directly from the browser — no server-side setup required.
sequenceDiagram
participant App as Your app (browser)
participant Widget as Landed widget
participant API as Landed API
App->>Widget: ld.identify({ id, email, name })
App->>Widget: User submits feedback
Widget->>API: POST /submissions { user: { id, email, ... }, text }
API->>API: Resolve identity, create or continue a conversationIdentify on login
After your user signs in, call ld.identify() from install step 3 (or from your app's auth callback):
<script>
window.ld.identify({
id: 'user_123',
email: 'jane@example.com',
firstName: 'Jane',
lastName: 'Doe',
avatar: 'https://example.com/avatar.jpg'
});
</script>When a user is identified, the widget hides the email and name fields in the feedback form.
Fields
| Field | Required | Notes |
|---|---|---|
id | Yes | Unique user id from your system |
email | Yes | Used to attribute the submission |
name | No | Full display name |
firstName / lastName | No | Alternative to name |
avatar | No | Profile image URL |
organization | No | Explicit organization with externalId and name. Never inferred from email. |
payment | No | Display-only billing summary on the identity (B2C) or on organization.payment (B2B), not both. |
Clear on logout
<script>
window.ld.identify(null);
</script>React example
useEffect(() => {
if (user) {
window.ld.identify({
id: user.id,
email: user.email,
firstName: user.firstName,
lastName: user.lastName,
});
} else {
window.ld.identify(null);
}
}, [user]);What Landed does on submit
When an identified user submits feedback, Landed:
- Matches the host product id within the workspace
- Joins by email only when exactly one normalized match exists
- Creates a workspace identity when the email is new
- Creates or continues a conversation and appends a customer-visible conversation message from the customer
Two host IDs stay separate people even when their emails match. A conflicting email on an existing host-ID match leaves that identity unchanged. Nameless visitors stay anonymous visitors when the widget allows anonymous use.
Without identify
If you do not call ld.identify(), the widget falls back to:
- Anonymous feedback (when allowed), or
- Email/name fields in the form
Security note
Because identification trusts the browser, a motivated user could impersonate another id/email via devtools. That is acceptable for many products today.