Identify visitor

Display detailed visitor information in the dashboard.


Enable Identify API

To use the identify method, you have to enable Identify users via API in project settings.


Developer needed

The identify method requires you or your developer to propagate information from your service. This method is called from your visitor's browser, therefore any information you want to associate with your visitor needs to be part of your website.

Why use the Identify API?

  • Identifying visitors is a useful for when you need to find a specific customer in the Smartlook system.

  • For cross-platform projects, the identify method is vital. When the user is identified, Smartlook can connect sessions from your website and your iOS or Android app. This allows you to observe true cross-platform user behavior.

  • Identifying users also helps your customer support teams. When a customer asks for support, your support team can look the customer up and use Smartlook to see what is causing the issue.

  • User identification is also vital for funnels, especially payment flows. Funnels allow you to see how many people dropped off of your website and what lead to them leaving the site. When they are identified, you can contact that user and provide assistance.

How to use the Identify method

To use the identify method, you need to have a unique visitor ID. Visitor IDs can be user email addresses, internal user IDs, or other identifiers.

When you have an identifier for your user, call identify after Smartlook initialization.

Sample usage

The code sample below shows the simplest usage of the identify method. This code sample assumes there is a unique userId variable that is a number or a string which identifies the visitor.

smartlook('identify', userId)


Name restrictions

  • Cannot be empty or null
  • Maximum length is 200 characters

An event with an invalid name will be dropped.

What can be displayed in the dashboard

There is no limit to what you can display in the Smartlook dashboard. You can display a user's name or email, or what package the user paid for, in what currency, and what the price was.

The third parameter of the identify method is optional. It is expected to be an object. The keys and values of this object are entirely up to you.

You can modify the code and expand it to your needs as you can see in the example below.

Let's assume that you use following data.

123John Doe[email protected]PremiumUSD150

You can call identify as shown in the code sample:

smartlook('identify', 123, {
  "name": "John Doe",
  "email": "[email protected]",
  "package": "Premium",
  "currency": "USD",
  "price": 150

You will see the following in the Smartlook dashboard:

User details in the Smartrlook dashboard

User details in the Smartlook dashboard


Unknown uid

Smartlook recommends that if you don't have the uid for the user you want to make changes to, that you do not make changes to the user using the Identify API. Doing so could result in unrelated sessions being grouped under the same uid.

Anonymizing users

Anonymizing users creates a new session. This method is helpful when multiple people use the same browser.

You can anonymize a previously identified user by calling: