Identifying users
Identifying users allows you to associate names, emails, or temporary support codes with sessions in your dashboard.

Anonymous visitors and logged-out users

The easiest way to identify users is to have them read out a 6-digit support code to an agent.
To get a support code, prompt your user to press the Equals (=) key 5 times. They should see a code in the corner:
Go ahead and try pressing Equals (=) 5 times on this page!
You can also add a button to your site that opens the code popup using our API:
1
Cohere.showCode();
2
// Optionally, pass in a position ("bottomRight", "bottomLeft", "topLeft", "topRight")
3
// like so: Cohere.showCode("bottomLeft");
Copied!
Now, you can search for your user in the Cohere dashboard's search bar.

Logged-in users

If your application is using Segment to collect user attributes, please see the Segment integration.
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!
Last modified 1mo ago