Identify visitor

Display detailed visitor information in the dashboard.


The identify method requires the "Identify users via API" setting enabled 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 webpage.

Why you should use it

  • Identifying the visitor is a useful concept for various use cases in which the specific customer needs to be looked up within the Smartlook systems.

  • For cross-platform projects, the usage of this method is vital. By providing the identification, Smartlook is able to connect sessions in between Web, iOS, and Android systems and give you the ability to observe true user behavior.

  • One of the common use cases is for customer support teams. When a customer is requesting help, the agent is able to look up the customer and understand the issue faster and better.

  • It is also vital for funnels, especially for payment flows. Smartlook then provides you with information about how many people dropped off, you can observe what leads to drop-offs, and with identification, you have the possibility to contact the customer and provide assistance if needed.

What you need to use it

  • Unique visitor ID - it may be the user's email, your internal user ID, or something like that.
  • Call identify after Smartlook initialization.


Below is the simplest usage of the identify method. The example assumes there is a userId variable identifying your visitor which is a unique number or string.

smartlook('identify', userId)

More visitor details

There is no limit to what you can display in the dashboard. It can be the user's name or email, or also 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 of this object are entirely up to you, as well as all of the values.

Feel free to 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

Then you may call identify like this.

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

In dashboard you will get this.

User detailUser detail

User detail

Anonymize user

You can anonymize the previously identified user by calling:


A new visitor with a new session will be created. This method is useful to call when multiple people are using the same browser (typically after logout).

Did this page help you?