analytics-react-native
analytics-react-native copied to clipboard
[Question] Relevant anonymous user id
Hello guys, I suppose my issue is just a question.
Overview
So when we set explicitly anonymousId via client?.userInfo.set there is way to get this data from userInfo.get() method later.
client?.userInfo.set({
anonymousId: userId,
userId: undefined,
});
The issue is that when App is closed and opened again, the value from userInfo.get() is not same what is sets in the all events for segment. The value in the events is correct and it's equal to value what was saved there via client?.userInfo.set however the anonymousId from userInfo.get() is completely different each time when app is re-opened.
The question is Am I doing right to get this value anonymousId or there is an another method for recievening value of anonymousId ?
p.s. client?.userInfo.set is called only once (for the first opening of app).