User Attributes

Attributes are collected by default by the Luciq SDK. These attributes contain information related to the users. You can add custom attributes using these APIs. Attributes can be added, retrieved, and removed.

Adding

Attach custom attributes to your user by passing two strings to the set attribute API. Much like a dictionary or map, the two strings are the value and key of the attribute.

Adding Attributes

Luciq.setUserAttribute("True", withKey: "Logged in")
Luciq.setUserAttribute("False", withKey: "Completed IAP")

Retrieving

You can retrieve all attributes related to a user using the retrieve API. This API returns an NSDictionary for iOS and a HashMap for Android.

Retrieving Attributes

//Retrieving
let loggedIn = Luciq.userAttribute(forKey: "Logged in")
//Retrieve all
let allUserAttributes = Luciq.userAttributes()

Removing

Attributes can be removed from a user by passing the key of the attribute you'd like to remove to the removal API.

Removing Attributes

Last updated