📘

The identify() method requires the "Identify users via API" setting enabled in project settings.

Syntax

identify(userId)
identify(userId, userDetail)

Parameters

userId

  1. User identification, which may be string or number.

userDetail

  1. Serializable Object, which may contain more user details.

Return value

void

Description

The identify() method is used for user identification, it allows you to track

Examples

Simple identification.

smartlook.identify('USER_ID')

Identification with more user details.

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