Documentation

Identifying the Visitor

You'll need to identify users in order to search for them on the UserView application. For more information, see Searching for Customers.

Here you can see you're able to search using Jack's email address, this is because the identity has been passed through UserView's code.

UserView Screenshot

If you'd like to see customer data (email address, name, unique id, etc.) on UserView, there may be some additional steps. If you use Intercom and Zendesk, we try to use their API to automatically display it for you, but if you don't, you'll only be able to see IP addresses.

Identifying Visitors on UserView

There are several ways to identify the visitor on UserView.

Providing Identity Information

You can provide identity information when initializing the SDK or update it later.

At Initialization

Provide the details with the Upscope('init'); function if you have them from your backend:

// Rest of the installation code...
Upscope('init', {
  identities: ['John Smith', 'acme.com'],
  uniqueId: '00032'
});

After Initialization (SPA)

Call Upscope('init'); first, then provide the identity information with Upscope('updateConnection');:

// Rest of the installation code...
Upscope('init');

// getVisitorInfo is a made up function you might have in your code
getVisitorInfo().then(visitor => {
  Upscope('updateConnection', {
    identities: [visitor.name],
    uniqueId: visitor.id
  });
});

Visitor Information Details

You can provide the following bits of visitor information:

KeyTypeDescription
identitiesString[]An array of strings with whatever identifying information you want to send us.
uniqueIdStringA string with a unique id of the visitor from your database. This could be the visitor's email address.
tagsString[], each matching /^#[A-Z-]+$/An array of hashtags to filter visitors by.
integrationIdsString[], each matching /^[a-z]{3,}:.+$/An array of strings representing an integration name and an integration id. For example, if your app is called acmechat, and the acmechat ID for the visitor is 123, you could pass ["acmechat:123"].
metadataObject/DictionaryCustom key-value pairs for additional visitor data.

Removing Identification

Any piece of identification set to undefined (web) or nil/null (mobile) will be ignored. If you identify visitors on the login page and they navigate to another area that doesn't have identification, we will keep the data we already have.

To explicitly remove any piece of data, set it to null (web), .remove (iOS), or pass null (Android).

Logging the Visitor Out

You can log the visitor out by calling the reset function:

Upscope('reset');

This will reset the connection and create a new visitor with a new ID.

Using the Lookup Code

Learn more about the lookup code on the dedicated page.