Package io.appmetrica.analytics.profile
Class CounterAttribute
java.lang.Object
io.appmetrica.analytics.profile.CounterAttribute
The counter attribute class.
It enables creating custom counter for the user profile.
EXAMPLE:
CounterAttribute timeLeftAttribute = Attribute.customCounter("time_left"); UserProfile userProfile = new UserProfile.Builder() .apply(Attribute.timeLeftAttribute().withDelta(-10d)) .build();
-
Method Summary
Modifier and TypeMethodDescriptionUserProfileUpdate<? extends io.appmetrica.analytics.impl.profile.UserProfileUpdatePatcher>
withDelta
(double value) Updates the counter attribute value with the specified delta value.
-
Method Details
-
withDelta
@NonNull public UserProfileUpdate<? extends io.appmetrica.analytics.impl.profile.UserProfileUpdatePatcher> withDelta(double value) Updates the counter attribute value with the specified delta value.- Parameters:
value
- Delta value to change the counter attribute value- Returns:
- The
UserProfileUpdate
object
-