There's some weirdness in how we clean and standardize alias calls that's mapping correct id's to "undefined" string distinct id's. Today we nullify distinct_id and distinctId while keeping distinct_id in the properties object. In enqueue(), there's a:
if (message.distinctId) {
message.distinct_id = message.distinctId
delete message.distinctId
}
that seems to protect against incorrect/null/undefined distinct_id's but that doesn't work if we flush it out already in alias().
There's some weirdness in how we clean and standardize
alias
calls that's mapping correct id's to "undefined" string distinct id's. Today we nullifydistinct_id
anddistinctId
while keepingdistinct_id
in theproperties
object. Inenqueue()
, there's a:that seems to protect against incorrect/null/undefined
distinct_id
's but that doesn't work if we flush it out already inalias()
.Captured conversation here - https://posthogusers.slack.com/archives/CT7HXDEG3/p1633637368418400
Tagging @yakkomajuri here in case I'm missing some historical context.
Checklist