You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Essentially, it just uses the $device_id and $used_id properties in track events to identify users (no separate identify calls needed).
If a Mixplanel project is created using a "Simplified API" id merge mode (which can't be changed), and we pass $device_id, and $user_id, I think it's being replaced in the following line:
Because ...getRequestBodyProperties(event, token) returns a $device_id property that has been set to a random UUID managed by this MC tool (in its own cookie), any $device_id we pass in the customFields is being overridden.
What do you think about switching the places so that any customField could replace the built-in ones, like this?
This way the $device_id and $user_id fields added to the tool settings (example: in Clodflare Zaraz dasboard) will have priority, and that way we can support "Simplified API" mode easily too?
Generally, I think customFields overriding any built-in properties the tool sets is a good and more intuitive idea.
Please let me know if I missed something. If this change is the only thing needed I can create a PR from a fork for it.
The text was updated successfully, but these errors were encountered:
kaleabmelkie
added a commit
to kaleabmelkie/managed-component-mixpanel
that referenced
this issue
Dec 12, 2024
Looking at the current source code, it seems like only "Original API" mode is supported for Mixpanel ID management.
Simplified ID Merge docs: https://docs.mixpanel.com/docs/tracking-methods/id-management/migrating-to-simplified-id-merge-system
Essentially, it just uses the
$device_id
and$used_id
properties in track events to identify users (no separate identify calls needed).If a Mixplanel project is created using a "Simplified API" id merge mode (which can't be changed), and we pass $device_id, and $user_id, I think it's being replaced in the following line:
mixpanel/src/index.ts
Lines 159 to 162 in 3e0e5cf
Because
...getRequestBodyProperties(event, token)
returns a$device_id
property that has been set to a random UUID managed by this MC tool (in its own cookie), any$device_id
we pass in thecustomFields
is being overridden.What do you think about switching the places so that any
customField
could replace the built-in ones, like this?This way the
$device_id
and$user_id
fields added to the tool settings (example: in Clodflare Zaraz dasboard) will have priority, and that way we can support "Simplified API" mode easily too?Generally, I think
customFields
overriding any built-in properties the tool sets is a good and more intuitive idea.Please let me know if I missed something. If this change is the only thing needed I can create a PR from a fork for it.
The text was updated successfully, but these errors were encountered: