What's the difference between `payload.userId` and `instance.user('userId')`? No way to reset google-tag-manager `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#L81
Problem is once you called identify with a non null userId, there is absolutely no way to set it back to null. Neither calling identify() again without an userId nor calling analytics.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 :)
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..