Package com.yandex.metrica.profile
Class UserProfile
java.lang.Object
com.yandex.metrica.profile.UserProfile
public class UserProfile
extends java.lang.Object
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
YandexMetrica.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();
YandexMetrica.reportUserProfile(userProfile);
YandexMetrica.setProfileId("id_1");
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUserProfile.BuilderBuilder class forUserProfileobjects. -
Method Summary
Modifier and Type Method Description java.util.List<UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher>>getUserProfileUpdates()static UserProfile.BuildernewBuilder()Creates the new instance ofUserProfile.Builder.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
getUserProfileUpdates
@NonNull public java.util.List<UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher>> getUserProfileUpdates() -
newBuilder
Creates the new instance ofUserProfile.Builder.- Returns:
- The
UserProfile.Builderobject.
-