Skip to content

Time and identity management updates

Compare
Choose a tag to compare
@tdumitrescu tdumitrescu released this 23 Oct 21:15
· 892 commits to master since this release
  • time prop is now set automatically with all events, recording UTC timestamp (in seconds) as the client (browser) sees it. The automatic value can be overridden by setting the time prop explicitly in tracking calls.
  • $user_id and $device_id superprops are set as part of identify/reset flows. This allows finer-grained identity management around linking anonymous, logged-in, and logged-out behavior. New additional behavior is as follows:
    • If the distinct_id is not stored in the persistence (cookie/localStorage) at the time of mixpanel.init() then the lib will set a field $device_id which will be the same as the distinct_id generated using UUID.
    • When identify() is called, $user_id will be set in the persistence to the value passed to the identify() call. For example, if you call mixpanel.identify('[email protected]'), $user_id will be set to "[email protected]".
    • If any of those fields ($device_id and $user_id) is set in the persistence, all events and property updates will have those fields added in addition to your properties.