How do I update the user profile property immediately the value changes without waiting for reauthentication to capture this new data if it stored in scenario where not stored it pose a challenge and also instances where user does not relogin or reauthenticate it pose another challenge. Can using a super property as part of the page load general component tracking code solve this?
Hi event, Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
To update user profile properties immediately when values change without waiting for reauthentication, you have several options in Mixpanel.
Updating User Profiles Immediately
When a user's property changes, you should: 1. Call .identify() first: Before setting any profile properties, always call the identify()
method with the user's distinct ID to associate the profile update with the correct user.2. Use .people.set() or equivalent: After identifying the user, use the appropriate method to update their profile properties immediately.LBKS// Example in JavaScript mixpanel.identify('12345'); mixpanel.people.set({ plan: 'Enterprise', company: 'mixpanel' });LBKS
This approach works across all Mixpanel SDKs, including JavaScript, Flutter, Unity, and others.
Using Super Properties
Yes, super properties can help solve this challenge. Super properties are: - Global event properties that are automatically included with all tracked events
- Saved to device storage and persist across app invocations
- Applied to all events without needing to specify them each timeTo use super properties: LBKS// Register a super property Mixpanel.Register("name", "Sam");LBKS// Now all tracked events will include this property Mixpanel.track("some_event");LBKS
As mentioned in the Unity SDK documentation, super properties persist between launches and updates, so they can help maintain user state without requiring reauthentication.
Best Practices
For optimal user identification and property tracking: 1. Call .identify() upon login or app reopening: This ensures pre and post-login events are linked to the same user.2. Track identifiers as both super properties and user properties: As recommended in the best practices documentation, this helps with troubleshooting.3. Update properties as soon as they change: Don't wait for reauthentication - update the profile immediately when a value changes.By implementing these approaches, you can ensure user profile properties are updated immediately when values change, without requiring users to reauthenticate.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.