Hey! My project is calculating sessions using the Timeout Based (30 minutes default). This month one alert had multiple events that weren't calculated as a session. The event isn't excluded from session calculation and was counted in a few sessions. I'm trying to understand why only a few became a session and other didn't. Thank you!
Hi Mayumi 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
Based on the information provided in the knowledge sources, there are several possible reasons why some events might not be calculated as part of a session while others are.In Mixpanel's timeout-based sessions (which you're using with the default 30-minute timeout), a session starts when a user performs any event and ends when the user is inactive for the specified period of time (30 minutes in your case).Here are some potential reasons why certain events might not be included in sessions: 1. Excluded Events: Some events are automatically excluded from session calculations. Mixpanel API events like $identify
, $create_alias
, $merge
, and others are excluded by default. If your events are similar to these, they might be excluded. Learn more about excluded events2. Hidden Events in Lexicon: Events that are hidden in Lexicon are not included in session calculations.3. Session Reset at Midnight: All sessions are reset at midnight according to your project timezone. If events occurred around midnight, they might be split into different sessions. See session examples4. Missing Session ID Property: If you're using property-based sessions, events without the specified Session ID property won't be used in calculating Session Start and End events.5. Event Timing: If events occurred outside the 30-minute window from the previous event, they would start a new session rather than continuing the existing one.To troubleshoot further, I recommend:
- Checking if the events in question have any properties that might be causing them to be excluded
- Verifying the exact timestamps of the events to see if they fall outside the 30-minute window
- Confirming that the events aren't on the excluded events list in your project settingsIf you need more specific help, you might want to examine the exact event data and timestamps to determine why they're not being included in sessions.
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.
Does a session need to have more than one event to be considered as a session?
Let me check the knowledge base for you again. One moment! 📚
Based on the knowledge sources, a session in Mixpanel can indeed consist of just a single event.When using timeout-based sessions (which you mentioned you're using with the default 30-minute timeout), a session starts when a user performs any non-excluded event. If no additional events occur within the timeout period (30 minutes in your case), the session will end, and the session duration would be 0 minutes since there was only one event.This is supported by the examples provided in the documentation. For instance, in the Event-Based Sessions example, it states: "A user performs 'Login' at 11:00 am triggering the 'Session Start' event. They then wait 15 minutes and perform a second 'Login' at 11:15 am. Since the user is already in a session, a new 'Session Start' event is not triggered." https://docs.mixpanel.com/docs/features/sessions#event-based-sessions|This implies that the first "Login" event alone was sufficient to create a session, even before any subsequent events occurred.Similarly, for Property-Based Sessions, the documentation shows that a single event with a session ID property is enough to trigger a "Session Start" event https://docs.mixpanel.com/docs/features/sessions#property-based-sessions|.So to directly answer your question: No, a session does not need to have more than one event to be considered a session in Mixpanel. A single event is sufficient to start a session, and if no other events occur within the timeout period, that session will consist of just that one event.This might explain why some of your events were calculated as sessions on their own, while others might have been grouped together if they occurred within the 30-minute timeout window of each other.I'm looking for more information about Mixpanel's behavior with single-event sessions?Let me know if you have any other questions!
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.
hi kapa.ai - I have a follow up question, please. For the rule - Session Reset at Midnight. My project is set on the Australian timezone, are you saying that if a user in the UK started a session in the UK but it turned midnight in Australia, a new session is created for that user in the UK?
Based on the knowledge sources provided, I can address your question about session resets at midnight in relation to project timezones.According to the documentation, Mixpanel uses your project's timezone setting for data analysis and reporting. For projects created before January 1, 2023, Mixpanel converts event timestamps to your project timezone before writing the event to your data stores, meaning timestamps are stored based on the project timezone setting at the time of ingestion.Since your project is set to Australian timezone, the midnight reset for sessions would indeed be based on midnight in Australia, not the local time of the user in the UK. This means that when it turns midnight in Australia, all active sessions across your project would reset, regardless of the local time where your users are located.This is because Mixpanel's session calculations are based on the project's timezone setting, not the individual user's local timezone. So yes, if a user in the UK started a session but it turned midnight in Australia during their session, a new session would be created for that user even though it's not midnight in their local UK time.This is an important consideration when analyzing session data for users across different time zones, as session breaks might not align with what users would perceive as natural session boundaries in their local time.I hope this clarifies how the midnight session reset works in relation to your project's timezone setting!
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.