Add the journeystatus property as an event property to all page load events. This property will track the current status of users in their application journey because currently passing this as a user property requires that the user visit again and their new status or current status is updated. This presents an issue
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 add the journeystatus
property as an event property to all page load events in Mixpanel, you should use Super Properties. This is the ideal approach for your situation since you want to include this property with every page load event automatically.
Using Super Properties for Page Load Events
Super Properties are event properties that you register once and are then automatically included with all subsequent events. This is perfect for your use case where you want to track the user's current journey status with every page view.Here's how you can implement this: 1. First, determine the user's current journey status in your application 2. Register this as a super property using the appropriate SDK method 3. The property will then be automatically included with all page view events
Implementation Example (JavaScript)
// (e.g., after login, after completing a step, etc.)
mixpanel.register({
"journeystatus": "active_subscriber" // or whatever the current status is
});LBKS// Now all subsequent events, including page views, will include this property
mixpanel.track("Page Viewed", {
"page_name": "/dashboard" // other page-specific properties
});LBKS```LBKSLBKSThis approach solves your issue because:
1. The journey status will be included with every event without having to set it each time
2. You can update the super property whenever the user's status changes
3. You don't need to wait for the user to visit again to see their updated statusLBKSWhen the user's journey status changes, simply update the super property: LBKSLBKS```LBKS// Update when the journey status changes
mixpanel.register({
"journeystatus": "completed_onboarding" // the new status
});LBKS```LBKSLBKSThis is more effective than using user properties for your specific use case, as user properties represent the current state but don't automatically get attached to events.LBKSFor more information on super properties, you can refer to the [Mixpanel documentation on Events and Properties](https://docs.mixpanel.com/docs/data-structure/events-and-properties#best-practices).
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.
Let me check the knowledge base for you again. One moment! 📚
I understand your concern about tracking changing journey statuses when users can restart their application process. Let me clarify how super properties work in this scenario.
Using Super Properties for Changing Journey Status
For your use case where a user's journey status changes (e.g., from "form filled" to "id verified" or back to "started" if they cancel), you should use the regular register()
method, not registerSuperPropertiesOnce()
.The difference is important: - register()
- Updates the super property value each time it's called, allowing you to change the journey status
- registerSuperPropertiesOnce()
- Only sets the value if it doesn't already exist, which wouldn't work for your changing status scenario
Implementation Example
mixpanel.register({
"journeystatus": "form_filled"
});LBKS// Later when they verify ID
mixpanel.register({
"journeystatus": "id_verified"
});LBKS// If they cancel and start over
mixpanel.register({
"journeystatus": "started"
});LBKS```LBKSLBKSEach time you call `register()`, it will update the "journeystatus" super property to reflect the user's current state. This updated value will then be automatically included with all subsequent events until changed again.LBKSThis approach is documented across Mixpanel's SDK documentation:
- [JavaScript SDK](https://docs.mixpanel.com/docs/tracking-methods/sdks/javascript#super-properties)
- [Android SDK](https://docs.mixpanel.com/docs/tracking-methods/sdks/android#setting-super-properties)
- [iOS Swift SDK](https://docs.mixpanel.com/docs/tracking-methods/sdks/swift#setting-super-properties)LBKSSuper properties are stored locally on the user's device and persist between sessions, making them ideal for tracking the current application status across page loads.
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.
Let me check the knowledge base for you again. One moment! 📚
While super properties are useful for tracking changing values like journey status, there are some drawbacks to consider when using them with changing values:
Drawbacks of Using Changeable Super Properties
1. Historical Context Loss: When you update a super property, you lose the historical values. Each event will only contain the most recent value of the super property at the time the event was tracked, not the value from when a previous event occurred.2. Local Storage Limitations: Super properties are stored in local storage on the user's device. As mentioned in the documentation: > "Our mobile libraries store your super properties in local storage. They will persist so long as the app is installed (between launches and updates). Uninstalling the app will remove that customers super properties."
This means if a user uninstalls your app or clears their browser data, the super property values will be lost Mixpanel SDKs: Android.3. Cross-Device Limitations: Super properties don't automatically sync across different devices. If a user switches from mobile to desktop, you'll need to re-register the super properties on each device.4. Race Conditions: When registering multiple super properties, there can be race conditions. The Swift SDK documentation specifically warns: > "As creating properties involves an async operation to local storage, if you will create multiple properties at once, it's best to send a single call to the register function with all properties at once, to avoid possible issues with race conditions overwriting each other." Mixpanel SDKs: iOS (Swift)5. Debugging Challenges: It can be harder to debug issues with changing super properties since you can't easily see their previous values in Mixpanel's interface.For your application journey tracking use case, you might want to consider a hybrid approach: - Use super properties to track the current status (for inclusion in all events) - Also track status changes as separate events with timestamps to maintain history - Consider tracking the journey status as an event property on critical events to ensure the value is captured regardless of super property issuesThis way, you maintain the convenience of super properties while addressing some of their limitations.Would you like me to suggest a specific implementation approach for your journey status tracking?
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.