How do I make a search in Mixpanel for all events of a certain type but show only one per distinct ID or one per user email?
Hi Moritz H., 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 search for all events of a certain type but show only one per distinct ID (i.e., one per user), you can use Mixpanel’s “Unique Users” measurement in the Insights report. Here’s how you can do it: 1. Create an Insights Report: Select the event type you’re interested in. 2. Set the Measurement: Click on the measurement dropdown (default is usually “Total Events”) and select Unique Users. This will count only one event per distinct_id (user) for the selected event type, regardless of how many times each user performed the event. 3. Apply Filters (Optional): You can further filter by properties, such as email, if needed.If you want to show only one event per user email, you would need to ensure that the email property is consistently set on your events. Then, you can break down or filter by the email property in your report. However, Mixpanel’s uniqueness is fundamentally based on distinct_id, not email, so if multiple users share the same email but have different distinct_ids, they will still be counted separately unless you unify your identity management strategy around email as the distinct_id (not generally recommended).Summary: - Use the Unique Users measurement to show only one event per distinct_id. - For email, break down or filter by the email property, but uniqueness is still based on distinct_id.For more details on measurements and uniqueness in Mixpanel reports, see the official documentation: Insights: Measurements.If you need to do this via a custom query (e.g., JQL), you would filter and then reduce by distinct_id, but the recommended approach is to use the built-in reporting features as described above.
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! 📚
To view one event per user and display the individual user email for each event in Mixpanel: 1. Create an Insights report and select your event type.
2. Set the measurement to "Unique Users"—this ensures you see only one event per distinct_id (user) for the selected event type.
3. Add a breakdown by the "Email" user property. This will display the email associated with each user (assuming you are setting the $email property on user profiles).Mixpanel joins user profile properties (like email) to events at query time, so as long as the user profile for each distinct_id has an email set, you will see the email alongside the event in your report. Note that the email shown will be the latest value on the user profile, not necessarily the value at the time the event was performed see FAQ.Key points:
- Uniqueness is based on distinct_id.
- Email is shown by breaking down or displaying the $email user property.
- The email shown is the latest value on the user profile for that distinct_id.For more on how Mixpanel joins events and user profiles, see: How does Mixpanel join Events and User Profiles?
For reserved properties like $email, see: Reserved Profile Properties.
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.
