User data
User Attributes
Tracking attributes
A user attribute is a trait or piece of information about a user e.g. the day they first signed up to your app. Attributes represent a single value for a user, but this value can change over time. Attributes can have different data types, depending on the value being tracked. Unflow supports the following attribute types:
- String
- Number
- Date
Once set an attribute will be associated with a user until it is updated. You can update attributes using the SDK method:
UnflowSDK.client.setAttributes(attributes: ["name": "Joe Bloggs", "planType": "Premium"])
Identifying users
By default users in Unflow are anonymous. This means that their attributes are tied to a specific installation of your app on a device. Specifying the users ID allows you to persist the users attributes across multiple devices and installations.
UnflowSDK.client.setUserId(userId: "<USER_ID>")