Help Center / Widget SDK
Identify users in the widget
Identify users to personalize their experience and track feedback across sessions.
Basic identification
Identify users after they log into your application:
window.uj.identify({
id: 'user_123', // Required: unique user ID
email: 'john@example.com',
firstName: 'John',
lastName: 'Doe',
avatar: 'https://example.com/avatar.jpg'
});
When to identify
Call identify()
after:
- User logs in
- User registration completes
- User information updates
- Page loads (for persistent sessions)
Secure identification
For enhanced security, use signed identification to prevent impersonation. See our Auto-login guide for server-side signature generation.
window.uj.identify({
id: 'user_123',
email: 'john@example.com',
signature: 'generated_hmac_signature' // Generated server-side
});
Anonymous users
The widget works without identification. Anonymous users can:
- Submit feedback (with email required)
- View public roadmap and updates
- Vote on features
Their submissions will be tracked by email if provided.
Clearing user data
When users log out, clear their identification:
// Clear user identification
window.uj.identify(null);
Single Page Applications
For SPAs, identify users when:
- Authentication state changes
- Route guards verify authentication
- User context updates
// React example
useEffect(() => {
if (user) {
window.uj.identify({
id: user.id,
email: user.email,
firstName: user.firstName,
lastName: user.lastName
});
} else {
window.uj.identify(null);
}
}, [user]);
Complete example
// On user login
async function handleLogin(credentials) {
const user = await authenticateUser(credentials);
if (user) {
// Identify in UserJot
window.uj.identify({
id: user.id,
email: user.email,
firstName: user.firstName,
lastName: user.lastName,
avatar: user.avatarUrl
});
}
}
// On user logout
function handleLogout() {
// Clear UserJot identification
window.uj.identify(null);
// Other logout logic...
}
Privacy considerations
- Only send necessary user information
- Follow your privacy policy guidelines
- UserJot stores user data securely
- Users can request data deletion through your dashboard
UserJot
Last updated on August 13, 2025.