User Identification

User identifier

User identifier can be specified by calling:

Smartlook.setUserIdentifier(identifier: String)
Smartlook.setUserIdentifier(@NonNull String identifier);

📘

Identifiers can be found in the Dashboard and are very useful for finding specific user’s recordings.

User properties

Additional user information such as name, email, etc., can be set using UserProperties helper class and its methods.

val userProperties = UserProperties()
    .putEmail("[email protected]")
    .putName("John Doe")

Smartlook.setUserProperties(userProperties)
UserProperties userProperties = new UserProperties()
   .putEmail("[email protected]")
   .putName("John Doe");

Smartlook.setUserProperties(userProperties);

📘

Note that email or name property will be displayed in the list of visitors in the Smartlook Dashboard. Otherwise the identifier is used.

If there is no suitable helper method for specific properties, put() method can be used. This method accepts a combination of key and value.

val userProperties = UserProperties()
  	.put("key", "value")

Smartlook.setUserProperties(userProperties)
UserProperties userProperties = new UserProperties()
  	.put("key", "value");

Smartlook.setUserProperties(userProperties);

All helper and put() methods have optional parameters immutable if set to true, the value that has been set for the key is going to be immutable. This means it cannot be set again (a new value will not override the old one).