User Properties
Set and manage user properties for segmentation
Version:
User properties are key-value pairs attached to all SDK requests. Use them to segment users and enrich your analytics data.
Whitelisted Properties
Standard properties that are sent to and stored on the AudienceLab backend.
// Set properties
AudiencelabSDK.SetUserProperty("subscription_tier", "premium");
AudiencelabSDK.SetUserProperty("player_level", 42);
AudiencelabSDK.SetUserProperty("country", "US");
AudiencelabSDK.SetUserProperty("is_vip", true);
// Remove a property
AudiencelabSDK.UnsetUserProperty("subscription_tier");
// Clear all whitelisted properties
AudiencelabSDK.ClearUserProperties();Blacklisted Properties
Sensitive properties that are sent with requests but not stored. Use these for data needed by ad networks (e.g., hashed identifiers for matching).
Platform Support
For TikTok and Meta, email and phone properties are
supported. Values must be hashed.
// Set blacklisted properties (for ad network matching)
AudiencelabSDK.SetUserProperty("email", "sha256_hash_here", blacklisted: true);
AudiencelabSDK.SetUserProperty("phone", "sha256_hash_here", blacklisted: true);
// Remove a blacklisted property
AudiencelabSDK.UnsetUserProperty("email", blacklisted: true);
// Clear all properties including blacklisted
AudiencelabSDK.ClearUserProperties(includeBlacklisted: true);Property Constraints
| Constraint | Limit |
|---|---|
| Max properties per set | 50 |
| Max key length | 64 characters |
| Max string value length | 256 characters |
| Max serialized size | 2,048 bytes |
Reserved Keys
Property keys starting with underscore (_) are reserved for backend use and cannot be set by the SDK. These are used by AudienceLab to attach server-side properties like attribution data.
Best Practices
- Set properties early (e.g., after user login) - Update properties when user state changes - Use blacklisted properties for PII hashes only