Script to update Mixpanel user identity for historical data
• Find all device IDs associated with each event-level attribute userid
• Identify the oldest device ID for each user
• Link all device IDs to the canonical user ID (which is the event-level attribute userid)
• Set the user profile using the oldest device's profile data for attributes like initial UTM source, etc.
please confirm if this script flow works or if anyone has other suggestions