analytics-react-native
analytics-react-native copied to clipboard
[bugfix] reset anonymousId properly
.reset(true)
function had a bad behavior because when is resetting the anonymousId comes form this.state.userInfo
instead of this.userInfo
, consulting a previous version of the field.
@jboteros can we get more details on how to repro the issue you are bumping into here?
this.userInfo
just maps into this.store.userInfo
so in theory it should be the same thing either way. I'm curious if this has fixed your issues and how to repro to understand better what's going on.
@jboteros can we get more details on how to repro the issue you are bumping into here?
this.userInfo
just maps intothis.store.userInfo
so in theory it should be the same thing either way. I'm curious if this has fixed your issues and how to repro to understand better what's going on.
Yes, that implementation fix our bug and now we have a proper reset user flow.
Basically the issue was related of the instance of the userInfo
because you reset the userInfo
in this.state.userInfo
but fetch it in this.userInfo
(at this point that instance is not update)
For now I created a patch over you package waiting for your fix and update it
BTW if is not clear the bug is related on the reset() and the anonymousID is not reseted properly conserve the same previous one.
Thanks!
Hi @jboteros apologies but is this still an issue? Oscar is no longer with Segment and I'm just trying to catch up on things here. Thanks!
Raised a PR with updated code PR : https://github.com/segmentio/analytics-react-native/pull/950