Open Msarnaot opened 5 years ago
Hello mates,
The use case outlined above by @Msarnaot is very intuitive. When we use "identify", we will be tracking all activity while the user is known + the activity when unknown related to the distinct ID which was aliased the first time.
But what if the user comes UNKNOWN another time from a different device. According to your documentation, we cannot alias him again to map another distinct ID. So here, all following activity while he is unknown with a distinct ID different than the aliased one, would be impossible to track??
Could you please confirm this? or is there a workaround?
Same question here :)
Same scenario:
alias
distinct id with user emailcc: @tdumitrescu, @jaredmixpanel, @carlsverre
if I got it right, this has to be solved with $identify
, something like:
track('someAction', {distinct_id: 'user-distinct-uuidv4-num1'})
track('$identify', {$identified_id: 'userId', $anon_id: 'user-distinct-uuidv4-num1'})
track('someAction', {distinct_id: 'user-distinct-uuidv4-num2'})
track('$identify', {$identified_id: 'userId', $anon_id: 'user-distinct-uuidv4-num2'})
*distinct_id has to be uuid v4
ok, so after small test everything works as described:
// new device random distinct_id1 uuid v4
await track('TestAction', {distinct_id: distinct_id1})
// and then identify distinct_id1 with userId
await track('$identify', {$identified_id: userId, $anon_id: distinct_id1})
// new device random distinct_id2 uuid v4
await track('TestAction2', {distinct_id: distinct_id2})
// and then identify distinct_id2 with userId
await track('$identify', {$identified_id: userId, $anon_id: distinct_id2})
as result distinct_id1, distinct_id2, userId are merged into single identity and can be tracked :rocket: :rocket: :rocket:
*to mention, project settings merge id
has to be enabled
asking questions and solving right in place - that is how we do it :nerd_face:
now would be nice to get mixpanel GROWTH
plan for free :wink:
and the issue can be closed
Hi Mixpanel Team,
We have recently started using this module and its been great so far, however I'm a little unclear regarding the alias method. Our scenario includes users coming multiple times to our product and can perform multiple actions before signing up or logging in.
If a user comes on first time, and they are not logged in I send a random distinct_id with all events on the server, once they do signup we call the alias method with their email, and all subsequent track calls will use their email address as the distinct_id not the original random distinct_id.
If the user comes on next week and they are not logged in, we do the same thing and track all events with a random distinct id, but then once they login I can send their email as the distinct_id, however do I alias again on their login to attach them to the new random ID that was being used on this second visit? The docs discourage multiple aliasing however it's unclear how to handle multiple random distinct_ids from different non logged-in sessions.