Tracking needs to be enabled during SDK initialization for this feature to work. Set CastledConfigs.enableTracking to true to start tracking.

Castled SDK provides methods that lets you create user profiles within your data warehouse. Attributes of the user can also be updated using these methods. These attributes can be one of the predefined attributes or any custom attributes of your choosing.

Following are the list of predefined user attributes avaliable for use when updating user profiles

  1. First Name
  2. Last Name
  3. Email
  4. Name
  5. Date of Birth
  6. Gender
  7. Phone Number
  8. City
  9. Country

Updating User Attributes

CastledNotifications.setUserAttributes method can be used to update user profile attributes. Custom attribute values can be of type number, boolean, string or date.

CastledUserAttributes userAttributes = new CastledUserAttributes();
// Predefined attributes
userAttributes. setCity("Sanfrancisco");
// Custom Attributes
userAttributes.setCustomAttribute("prime_member", true);
userAttributes.setCustomAttribute("occupation", "artist");


All the user profiles created will eventually land in the user table in your configured data warehouse.

Before updating user attributes make sure to update the user-id using CastledNotifications.setUserId, so that SDK knows the user whose properties are being updated.