Package io.appmetrica.analytics.profile
Class UserProfile
java.lang.Object
io.appmetrica.analytics.profile.UserProfile
The class to store a user profile.
User profile is a set of user attributes. User profile details are displayed in the AppMetrica User profiles report.
The UserProfile object should be passed to the AppMetrica server by using the
AppMetrica.reportUserProfile(UserProfile)
method.
User profiles are stored on the AppMetrica server.
EXAMPLE:
UserProfile userProfile = new UserProfile.Builder()
.apply(Attribute.customString("foo_attribute").withValue("baz_value"))
.apply(Attribute.name().withName("John"))
.apply(Attribute.gender().withValue(GenderAttribute.Gender.MALE))
.apply(Attribute.notificationEnabled().withValue(false))
.build();
AppMetrica.reportUserProfile(userProfile);
AppMetrica.setProfileId("id_1");
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionList<UserProfileUpdate<? extends io.appmetrica.analytics.impl.profile.UserProfileUpdatePatcher>>
static UserProfile.Builder
Creates the new instance ofUserProfile.Builder
.
-
Method Details
-
getUserProfileUpdates
@NonNull public List<UserProfileUpdate<? extends io.appmetrica.analytics.impl.profile.UserProfileUpdatePatcher>> getUserProfileUpdates()- Returns:
- list of all
UserProfileUpdate
objects
-
newBuilder
Creates the new instance ofUserProfile.Builder
.- Returns:
- The
UserProfile.Builder
object.
-