From df39030e247f7de9dc448421bd477a281fcb684a Mon Sep 17 00:00:00 2001 From: Zihe Jia Date: Thu, 17 Mar 2022 13:23:12 -0700 Subject: [PATCH] update docs after merge people.identify into mixpanel.identify --- gradle.properties | 2 +- .../android/mpmetrics/MixpanelAPI.java | 34 +++++++------------ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/gradle.properties b/gradle.properties index d27e0ae1..268d4845 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=6.1.0 +VERSION_NAME=6.2.0-SNAPSHOT POM_PACKAGING=aar GROUP=com.mixpanel.android diff --git a/src/main/java/com/mixpanel/android/mpmetrics/MixpanelAPI.java b/src/main/java/com/mixpanel/android/mpmetrics/MixpanelAPI.java index 5dfb29b0..da21d69d 100644 --- a/src/main/java/com/mixpanel/android/mpmetrics/MixpanelAPI.java +++ b/src/main/java/com/mixpanel/android/mpmetrics/MixpanelAPI.java @@ -401,8 +401,7 @@ public void setServerURL(String serverURL) { * to the current events distinct_id, which may be the distinct_id randomly generated by the Mixpanel library * before {@link #identify(String)} is called. * - *

This call does not identify the user after. You must still call both {@link #identify(String)} and - * {@link People#identify(String)} if you wish the new alias to be used for Events and People. + *

This call does not identify the user after. You must still call {@link #identify(String)} if you wish the new alias to be used for Events and People. * * @param alias the new distinct_id that should represent original. * @param original the old distinct_id that alias will be mapped to. @@ -677,18 +676,13 @@ public JSONObject getSuperProperties() { } /** - * Returns the string id currently being used to uniquely identify the user associated - * with events sent using {@link #track(String, JSONObject)}. Before any calls to + * Returns the string id currently being used to uniquely identify the user. Before any calls to * {@link #identify(String)}, this will be an id automatically generated by the library. * - *

The id returned by getDistinctId is independent of the distinct id used to identify - * any People Analytics properties in Mixpanel. To read and write that identifier, - * use {@link People#identify(String)} and {@link People#getDistinctId()}. * - * @return The distinct id associated with event tracking + * @return The distinct id that uniquely identifies the current user. * * @see #identify(String) - * @see People#getDistinctId() */ public String getDistinctId() { return mPersistentIdentity.getEventsDistinctId(); @@ -1074,8 +1068,6 @@ public void optInTracking() { * * @param distinctId Optional string to use as the distinct ID for events. * This will call {@link #identify(String)}. - * If you use people profiles make sure you manually call - * {@link People#identify(String)} after this method. * * See also {@link #optInTracking(String)}, {@link #optInTracking(String, JSONObject)} and * {@link #optOutTracking()}. @@ -1091,8 +1083,7 @@ public void optInTracking(String distinctId) { * * @param distinctId Optional string to use as the distinct ID for events. * This will call {@link #identify(String)}. - * If you use people profiles make sure you manually call - * {@link People#identify(String)} after this method. + * * @param properties Optional JSONObject that could be passed to add properties to the * opt-in event that is sent to Mixpanel. * @@ -1157,10 +1148,12 @@ public boolean hasOptedOutTracking() { */ public interface People { /** + * Associate future calls to {@link #set(JSONObject)}, {@link #increment(Map)}, + * {@link #append(String, Object)}, etc... with a particular People Analytics user. + * * @deprecated in 6.2.0 * NOTE: This method is deprecated. Please use {@link MixpanelAPI#identify(String)} - * instead. Associate future calls to {@link #set(JSONObject)}, {@link #increment(Map)}, - * {@link #append(String, Object)}, etc... with a particular People Analytics user. + * instead. * *

All future calls to the People object will rely on this value to assign * and increment properties. The user identification will persist across @@ -1339,17 +1332,17 @@ public interface People { /** * Returns the string id currently being used to uniquely identify the user associated * with events sent using {@link People#set(String, Object)} and {@link People#increment(String, double)}. - * If no calls to {@link People#identify(String)} have been made, this method will return null. + * If no calls to {@link MixpanelAPI#identify(String)} have been made, this method will return null. * - *

The id returned by getDistinctId is independent of the distinct id used to identify - * any events sent with {@link MixpanelAPI#track(String, JSONObject)}. To read and write that identifier, - * use {@link MixpanelAPI#identify(String)} and {@link MixpanelAPI#getDistinctId()}. + * @deprecated in 6.2.0 + * NOTE: This method is deprecated. Please use {@link MixpanelAPI#getDistinctId()} instead. * * @return The distinct id associated with updates to People Analytics * * @see People#identify(String) * @see MixpanelAPI#getDistinctId() */ + @Deprecated String getDistinctId(); /** @@ -1617,8 +1610,7 @@ public void identify(String distinctId) { return; } if (distinctId != mPersistentIdentity.getEventsDistinctId()) { - MPLog.e(LOGTAG, "Can't identify with a distinct_id different from the one being set by MixpanelAPI.identify()."); - return; + MPLog.w(LOGTAG, "Identifying with a distinct_id different from the one being set by MixpanelAPI.identify() is not recommended."); } identify_people(distinctId); }