Open benjamindulau opened 1 year ago
Well it seems that calling reset()
or identify()
or identify(null)
does not clear instance.user('userId')
either...
I give up, I don't understand what is the recommended way to handle the user
identification there.
user.traits
are correctly overridden, but I don't find any way to clear the user.userId
property..
I don't quite understand where the
payload.userId
comes from here https://github.com/DavidWells/analytics/blob/master/packages/analytics-plugin-google-tag-manager/src/browser.js#L81Problem is once you called
identify
with a non nulluserId
, there is absolutely no way to set it back tonull
. Neither callingidentify()
again without anuserId
nor callinganalytics.reset()
have any effect on this.Every subsequent calls to track include a stale
userId
property...What code is responsible of setting this userId property in the payload object? And why is this plugin using this instead of
instance.user('userId')
? What's the difference between the two?Thanks :)