How do I call this reporting that is meant to provide the number of users based on device ID as proxy and number of users that have suucessfully signed-in based on $user_id to track same user kapa.ai
To report on the number of users based on device ID (as a proxy for anonymous users) and the number of users who have successfully signed in (based on $user_id), you would typically use Mixpanel’s event and property filtering capabilities. Here’s how you can approach this:
1. Counting Users by Device ID (Anonymous Users)
- Anonymous users are tracked by the $device_id
property before they log in or sign up.
- In Mixpanel, events sent before calling .identify(<user_id> )
will only have $device_id
and not $user_id
.
- To count these users, you can create a report (such as an Insights or Users report) and group by the $device_id
property, filtering for events where $user_id
is not set.
2. Counting Users by $user_id (Signed-in Users)
- Signed-in users are tracked by the $user_id
property after .identify(<user_id> )
is called.
- To count these users, create a report and group by the $user_id
property, filtering for events where $user_id
is present.
3. Tracking the Same User Across States
- Mixpanel’s ID Merge system will retroactively merge anonymous and identified events for the same user, so you can track the full user journey from anonymous to signed-in. When both $device_id
and $user_id
appear in the same event, Mixpanel merges them into a single user profile, and all events (past and future) are attributed to that user [Identifying Users (Simplified) - Mechanism].
Example: How to Set Up the Reports
- Anonymous Users:
- Create an Insights report.
- Select an event (e.g., "App Open" or "Page View").
- Group by $device_id
.
- Filter where $user_id
is not set.- Signed-in Users:
- Create an Insights report.
- Select an event (e.g., "Sign In" or any post-login event).
- Group by $user_id
.
- Filter where $user_id
is set.
Important Notes
- The actual implementation in the Mixpanel UI will depend on your event naming and property setup.
- The merging of anonymous and signed-in events is handled automatically by Mixpanel when both $device_id
and $user_id
are present in the same event [Understanding Simplified ID Merge].If you need to track the transition from anonymous to signed-in for the same user, you can analyze the user journey by looking at the merged profile in Mixpanel, which will include both pre- and post-login events [Identifying Users (Simplified) - Example User Flows].In summary:
- Use $device_id
to count anonymous users.
- Use $user_id
to count signed-in users.
- Mixpanel will automatically merge these when the user signs in, allowing you to track the same user across both states.
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.