I'm curious about the criteria for issuing new sessions in the mix panel. During the session's duration, even if the URL accessed by the user changes and the landing page accessed changes, will the session remain the same, or will it be differentiated and calculated as another session? And does it affect the calculation of the session even if it is moved through various internal links on the website after accessing the web page?
Hi choiyeongung, 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
Mixpanel determines when a new session starts based on how sessions are configured in your project. The default and most common method is timeout-based sessions, where a session starts when a user performs any event and ends after a period of inactivity (default: 30 minutes). There are also event-based and property-based session options, but unless you specifically configure those, timeout-based is used.Changing URLs or navigating through internal links within your website does not, by itself, start a new session. As long as the user continues to perform events (such as page views or clicks) within the session timeout window, all those actions—including visiting different pages or landing pages—are considered part of the same session. The session only ends if the user is inactive for longer than the configured timeout period, or if your project uses event-based or property-based session logic that defines session boundaries differently.So, to directly answer your questions: - If the user changes the URL or landing page during a session, the session remains the same (unless the session timeout is reached or a session boundary event/property is triggered). - Navigating through various internal links after accessing the web page does not affect the session calculation—all those actions are grouped into the same session as long as the user remains active within the timeout window.You can configure session settings (timeout duration, event-based, or property-based) in your project settings, and these definitions apply retroactively to your data. For more details, see the official documentation: Sessions: Compute sessions based on existing event data and Session Computation Deep-Dive.
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.
So I'm curious about it more. If the project can set the session boundaries, do you mean that I can configure logic and store the UTM URL inside browser storage to detect the changed event, or save it through the backend through the user's fingerprint and trigger changing session event? I wonder if it's an official event that's basically provided. kapa.ai
Let me check the knowledge base for you again. One moment! 📚
Mixpanel allows you to configure session boundaries in three main ways: timeout-based (default), event-based, and property-based sessions. However, based on the knowledge sources, there is no official feature that automatically triggers a new session when a UTM parameter or URL changes. Here’s what is officially supported: - Timeout-based sessions: Sessions are defined by user inactivity (default: 30 minutes). Changing the URL or UTM parameters does not, by itself, start a new session.
- Event-based sessions: You can define specific events (e.g., "Login" as session start, "Logout" as session end) to mark session boundaries. This is configured in project settings, but it requires you to have clear events that denote session start and end—not based on UTM or URL changes unless you explicitly track such events yourself Sessions: Compute sessions based on existing event data.
- Property-based sessions: You can use a property like session_id
to define session boundaries. If you want to start a new session when a UTM parameter or URL changes, you would need to implement logic (client-side or server-side) to generate a new session_id
when such a change is detected, and send it with your events. Mixpanel will then treat events with the same session_id
as part of the same session, and a new session_id
will start a new session Property-Based Sessions.UTM parameters are automatically tracked and stored as event properties and user profile properties by the Mixpanel JavaScript SDK, but they do not, by default, trigger new sessions. You can persist UTM parameters as super properties or disable their persistence for more accurate attribution modeling Track UTM Tags.In summary:
- Mixpanel does not provide an official, built-in event that triggers a new session on UTM or URL change.
- If you want session boundaries to align with UTM or URL changes, you must implement custom logic to generate and assign a new session_id
property when such changes occur, and use property-based session computation.
- Storing UTM parameters in browser storage or backend is up to your implementation, not something Mixpanel does automatically for session boundaries.If you need more advanced session logic (e.g., based on UTM changes), you must handle it in your own code and leverage property-based sessions in Mixpanel. This is not an official out-of-the-box event or feature Session Computation Deep-Dive.
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.
I understand that the session is separated after midnight, but if the user was acting between midnight, will this user's session count to 2 sessions when the session data is separated? kapa.ai
Let me check the knowledge base for you again. One moment! 📚
Yes, if a user is active across midnight, Mixpanel will split their activity into two separate sessions. All sessions are reset at midnight according to your project timezone, regardless of the session computation method (timeout-based, event-based, or property-based). This means that if a user is active before and after midnight, their activity will be counted as two sessions—one ending at midnight and a new one starting immediately after midnight.For example, if a user performs an event at 11:50pm and another at 12:05am, the first session will end at midnight, and a new session will start at 12:05am. This behavior is consistent across all session computation types in Mixpanel Session Computation Deep-Dive Examples.
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.