When users are identified, their information appears in your Heyo dashboard, making it easier for your support team to provide personalized help.
Call identify() with the user's information (works with both HTML script and JS SDK):
HEYO.identify({
email: '[email protected]',
name: 'John Doe',
userId: '12345',
});
The main identification fields are:
HEYO.identify({
email: '[email protected]',
name: 'Sarah Wilson',
userId: 'user_789',
});
After user logs in:
// When your authentication completes
auth.onLogin((user) => {
HEYO.identify({
email: user.email,
name: user.displayName,
userId: user.id,
});
});
userId is required to actually identify users. You can pass any internal ID you want, as long as it's unique per user.When you call HEYO.identify() with a different userId or email than the currently identified user, Heyo will automatically:
This prevents conversations from being merged, for example when you need to impersonate users for debugging.
If you need to explicitly clear the current session (for example, when a user logs out), you can use the logout() method:
HEYO.logout();
This will clear the session cookies and reset the widget state.