Client SDKs

User Properties

Set and manage user properties with the Android SDK

User properties are key-value pairs attached to all SDK requests. Split into whitelisted (wp, stored in analytics) and blacklisted (bp, forwarded to ad networks only).

Whitelisted Properties (wp)

AudienceLabSDK.setUserProperty(
    key = "subscription_tier",
    value = "premium",
    scope = UserPropertyScope.WHITELISTED
)

AudienceLabSDK.unsetUserProperty(
    key = "subscription_tier",
    scope = UserPropertyScope.WHITELISTED
)

AudienceLabSDK.clearUserProperties(UserPropertyScope.WHITELISTED)

Blacklisted Properties (bp)

Forwarded to ad networks only, never stored. Use for sensitive identifiers.

Ad Network Support

For TikTok and Meta, email and phone are supported. On Android, the SDK automatically normalizes and SHA-256 hashes those two keys before storing or sending them.

AudienceLabSDK.setUserProperty(
    key = "email",
    value = "player@example.com",
    scope = UserPropertyScope.BLACKLISTED
)

AudienceLabSDK.unsetUserProperty(
    key = "email",
    scope = UserPropertyScope.BLACKLISTED
)

Reading Properties

val wp = AudienceLabSDK.getWhitelistedUserProperties()
val bp = AudienceLabSDK.getBlacklistedUserProperties()

Property Constraints

ConstraintLimit
Max properties per set50
Max key length64 characters
Max string value length256 characters
Max serialized size2,048 bytes

Reserved Keys

Keys starting with _ are reserved for backend use (e.g. _network).

Best Practices

  • Set properties early (after user login)
  • Update when user state changes
  • Use blacklisted properties for sensitive identifiers that should not be stored in analytics