Skip to content

Commit 0f2b65c

Browse files
gazoudoudoudavide-scalzo
authored andcommitted
improve doc : add comments for createAlias, identify, set, setOnce and reset methods (davide-scalzo#158)
1 parent 0f463ab commit 0f2b65c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ Mixpanel.track("Event name");
8686
//Track event with properties
8787
Mixpanel.trackWithProperties('Click Button', {button_type: 'yellow button', button_text: 'magic button'});
8888

89-
//Create Alias from unique id
89+
//Create Alias from unique id, i.e. create a new mixpanel profile: to call when a user signs up, with a unique id that is not used by another mixpanel profile as param
9090
Mixpanel.createAlias(UNIQUE_ID)
9191

92-
//Identify
92+
//Identify, i.e. associate to an existing mixpanel profile: to call when a user logs in and is already registered in Mixpanel with this unique id
9393
Mixpanel.identify(UNIQUE_ID)
9494

95-
//Set People properties
95+
//Set People properties (warning: if no mixpanel profile has been assigned to the current user when this method is called, it will automatically create a new mixpanel profile and the user will no longer be anonymous in Mixpanel)
9696
Mixpanel.set({"$email": "elvis@email.com"});
9797

98-
//Set People Properties Once
98+
//Set People Properties Once (warning: if no mixpanel profile has been assigned to the current user when this method is called, it will automatically create a new mixpanel profile and the user will no longer be anonymous in Mixpanel)
9999
Mixpanel.setOnce({"$email": "elvis@email.com", "Created": new Date().toISOString()});
100100

101101
// Timing Events
@@ -133,7 +133,7 @@ Mixpanel.clearPushRegistrationId();
133133
// iOS
134134
Mixpanel.addPushDeviceToken("APNS push token")
135135

136-
// Mixpanel reset method
136+
// Mixpanel reset method (warning: it will also generate a new unique id and call the identify method with it. Thus, the user will not be anonymous in Mixpanel.)
137137
Mixpanel.reset();
138138

139139
// get the last distinct id set with identify or, if identify hasn't been

0 commit comments

Comments
 (0)