User

User identifier

Pre API 2.0

Smartlook.setUserIdentifier("sample-identifier")
Smartlook.setUserIdentifier("sample-identifier");

API 2.0

Smartlook.instance.user.identifier = "sample-identifier"
Smartlook.getInstance().getUser().setIdentifier("sample-identifier");

🚧

Identifier restrictions

  • An identifier cannot be null or left empty
  • The maximum length is 120 characters.

Identifier documentation.

User name & email

Pre API 2.0

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);

API 2.0

Smartlook.instance.user.name = "John Doe"
Smartlook.instance.user.email = "[email protected]"
Smartlook.getInstance().getUser().setName("John Doe");
Smartlook.getInstance().getUser().setEmail("[email protected]");

User name & email documentation.

User properties

Pre API 2.0

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

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

Smartlook.setUserProperties(userProperties);

API 2.0

Smartlook.instance.user.properties.putString("name", "value")
Smartlook.getInstance().getUser().getProperties().putString("name", "value");

🚧

Name restrictions

  • Cannot be empty or null.
  • The maximum length is 200 characters.
  • Can only contain alphanumeric characters, underscore (_), comma (,), period (.), and hyphen (-).
  • Must start with an alphabetic character.

🚧

Value restrictions

  • The maximum length is 5 kilobytes.

User properties documentation.