How to identify a user
Identify a user to quickly search for them on Upscope and to easily switch between their different browsers
Joe avatar
Written by Joe
Updated over a week ago

When you install Upscope, you are able to identify a user to make it easier for your Agents to search by name or email. Additionally, assigning a unique ID to each user allows your agents to quickly switch between the user's different browsers.

Identify at page load

To identify a user when the page loads, pass the following options to Upscope('init', …) :

Upscope('init', {
  ...
  identities: ['name', 'email'], // This can be a list of separate identities, a string with a single identity, or null
  uniqueId: '123', // This can be a string or number uniquely identifying the user, or null
});

Identify after Upscope was already initiated

If you run a SPA where the user's auth status might change within a single page load, you can update the User information by calling the following function:

Upscope('updateConnection', {
  identities: ['name', 'email'], // This can be a list of separate identities, a string with a single identity, or null
  uniqueId: '123', // This can be a string or number uniquely identifying the user, or null
});

To log the user out, you would set identities  and uniqueId  to null.

❗️ You can use  identities  and  uniqueId  at the same time or separately.

Example

Let's say you want the user list to also show the person's email address and their company name as follows:

Using the SPA example code above you'd add a new script block and pass in the company name and email into the identities list:

<script>
Upscope('updateConnection', {
identities: ["Acme Technologies", "john@acme.com"]
});
</script>
Did this answer your question?