analytics-react-native
analytics-react-native copied to clipboard
createClient calling multiple times when app being killed status to foreground
analytics-react-nativeversion:^2.16.1- React Native version:0.66.4
- iOS or Android or both? both
Steps to reproduce
- Initialise the segment as per provided document
const segmentClient = createClient({
writeKey,
trackAppLifecycleEvents: true,
collectDeviceId: true,
debug: true,
trackDeepLinks: true,
});
- And I have checked the anonymousId something like : xyzpqr
segmentClient.userInfo.get()?.anonymousId
- Now I have killed the app and open again at that time new anonymousId was created like : abcdefg
it means every lunch time this method call again and create a new anonymousId
While I have integrated older version 1.5.2 with
SegmentAnalytics.useNativeConfiguration();method, everytime I can get same anonymousId
Expected behavior
- After upgrade to new version of segment ^2.16.1, it should be provide same anonymousId.
Is there any solution for this please share