UserIdentity

sealed class UserIdentity(source)

Who the events reported after Analytics.setup belong to. Replaces a plain-String identity in which a blank silently meant "mint one for me" - a value that is easy to produce by accident and yields events that never audience-match.

Analytics.setup(application, UserIdentity.of(userId), token)

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard

The marketplace's own identifier for this user. Audience matching resolves it against the marketplace's records, so pass one whenever available - logged in or not.

Link copied to clipboard

No marketplace identifier is available. The SDK keeps the id already in effect if there is one - Unidentified never downgrades an identity we already hold - and otherwise mints one and persists it, so the device keeps the same identity across launches. Events under a minted id are delivered and billed normally but will not audience-match.