Storyteller User Attributes
Defines an interface for managing custom user attributes and other user-specific data like followed categories and locale. These attributes can be used for audience segmentation, content personalization, and analytics. For more details on managing user information, see the Storyteller User Management Documentation.
Properties
A read-only map of all custom attributes currently set for the user. Keys are attribute names and values are their corresponding string values. These attributes are typically set via setCustomAttribute.
A read-only set of category IDs that the user is currently following. This list can be modified using addFollowedCategory, addFollowedCategories, and removeFollowedCategory.
A set of custom attributes formatted for use in analytics events. This property provides a readily formatted collection of attributes for tracking purposes.
Functions
Adds a list of category IDs to the user's followed categories. If any of the provided categories are already followed, they will not be added again.
Adds a single category ID to the user's followed categories. If the category is already followed, it will not be added again.
Removes a custom attribute previously set for the user. If no attribute is found for the given key, this operation has no effect.
Removes a list of category IDs from the user's followed categories. If any of the provided categories are not currently followed, they will be ignored.
Removes a category ID from the user's followed categories. If the category is not currently followed, this operation has no effect.
Sets a custom attribute for the user. If an attribute with the same key already exists, its value will be updated. Setting a value to null is equivalent to calling removeCustomAttribute for that key.
Sets the user's preferred locale. This can influence the language or regional variations of content displayed by the SDK. The locale string should typically be a 2-letter ISO 639-1 language code (e.g., "en") or a language code followed by a 2-letter ISO 3166-1 country code (e.g., "en-US"). The SDK currently supports a maximum length of 3 characters for the locale string, but using standard two-letter codes (or language-country like "en-US" which gets processed appropriately) is recommended.