Skip to main content
Stores structured attributes for the current user to power offer targeting, personalization, and analytics. Attributes are merged with the ones already stored; they do not replace them.

Signature

The Future completes once the call reaches the native SDK. It does not wait for the network.

Parameters

Merge rules

Attributes are merged, not replaced. If you set email and subscriptionTier, then later set monthsSubscribed, all three are kept.
  • A field you leave null is unchanged. Passing only language updates language and nothing else.
  • custom merges key by key. A key you send overwrites the stored value for that key; keys you don’t send are kept.
  • You can’t clear a single field. null means “leave as is”. To clear everything, call reset().
  • An empty EncoreUserAttributes() does nothing.
identify() behaves differently: attributes passed there replace the stored set.

Usage

Basic attributes

Custom attributes

Location and language

Call setUserAttributes() after configure(). Attributes set before the SDK is configured are not stored.