Identifying Users
Identifying users allows you to associate names, emails, or temporary support codes with sessions in your dashboard.
If your site is hosted on a no-code platform, please see the identification instructions for Bubble.io and Shopify.

Logged in users

After users have logged in, you can identify them by passing a unique user ID (required) along with the attributes you would like to see on the Cohere dashboard — for instance, their name and email.
1
Cohere.identify(
2
"<user_id>", // Required: can be any unique ID
3
{
4
displayName: "<user_display_name>", // Optional
5
email: "<user_email>", // Optional
6
}
7
);
Copied!

Logged out users

If you need to support users who haven't already logged in (e.g. if you're assisting them through a phone call), you can add a button to your page that generates a unique code for the user.
1
Cohere.showCode();
2
// Optionally, pass in a position ("bottomRight", "bottomLeft", "topLeft", "topRight")
3
// like so: Cohere.showCode("bottomLeft");
Copied!
This will open a modal containing the generated code in the corner (bottom right by default) of your user's screen, which they can then read to you:
You'll be able to find the user by searching for this code in the Cohere dashboard.
Last modified 7mo ago