setIdentity

abstract fun setIdentity(identity: String, priority: Int? = Alias.LOWEST_PRIORITY, expiry: Date? = Alias.NEVER_EXPIRE)

Associate an alias with the current user. Forces segments and queries to be updated with the associated identity, if there is one on the server. Aliases will be deleted when their expiry is in the past.

Parameters

identity

An unique identifier of the user.

priority

The priority of the alias, where 0 is the highest and Alias.LOWEST_PRIORITY is the lowest (Default: Alias.LOWEST_PRIORITY)

expiry

The expiry time and date of the alias or Alias.NEVER_EXPIRE if it never expires (Default: Alias.NEVER_EXPIRE)


abstract fun setIdentity(identity: String)

Associate an alias with the current user with lowest priority that never expires. Forces segments and queries to be updated with the associated identity, if there is one on the server.

Parameters

identity

An unique identifier of the user.


abstract fun setIdentity(aliases: List<Alias>)

Associate an list of aliases with the current user. Aliases are resolved in the order given. Forces segments and queries to be updated with the associated identity, if there is one on the server.

Parameters

aliases

A list of aliases to use to identify the user.