Skip to content

Commit 0d1f432

Browse files
Update CHANGELOG.md
1 parent 55fdd0d commit 0d1f432

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# 1.2.8
22

3-
- Unify how `reset()` method works on iOS and Android. This change should close an issue: https://github.com/davodesign84/react-native-mixpanel/issues/258 `reset()` method contains new params: `flushOnReset` and `autoGenerateNewUniqueId` and it is backward compatible. More in README.md
43
- Fix `sharedInstanceWithToken` method definition
4+
- Unify how `reset()` method works on iOS and Android. This change should close an issue: https://github.com/davodesign84/react-native-mixpanel/issues/258 `reset()` method contains new params: `flushOnReset` and `autoGenerateNewUniqueId` and it is backward compatible. More in README.md
5+
6+
#### The old problem with `reset()` method:
7+
8+
Mixpanel introduced identity merge which allows you to call `.identify(SOME_USER_ID)` and Mixpanel will then merge the profiles for the id you pass in, in this case, `SOME_USER_ID`, and the anonymous id of the user prior to identification. This scenario is currently supported by this library. However, signing out causes some issues. This is because on signout Mixpanel recommends calling `.reset()` to get a new anonymous id for the current user. In this implementation, when we call `.reset()` we immediately call `.identify()` with a newly generated id, for ease-of-use. With calling `.identify()` on `.reset()` we are implicitly merging the newly generated id with the anonymous id. This causes problems because identity merge will not work on anonymous ids that have been already merged.
9+
10+
#### Solution:
11+
12+
Allow the user to pass a boolean to `.reset()` to toggle auto-identifying the user and to toggle auto-flush on reset.
13+
14+
#### Mixpanel's Identity Merge Flow
515

16+
![Mixpanel's Identity Merge Flow](https://camo.githubusercontent.com/267bbd9cb5e376993b8b89c8859e79651830a9e8/68747470733a2f2f66696c65732e726561646d652e696f2f643030363666302d49445f6d616e6167656d656e745f6964656e746966795f332d485454502e706e67 "Mixpanel's Identity Merge Flow")
617

718
# 1.2.7
819

0 commit comments

Comments
 (0)