Mixpanel Community Icon

Understanding Session Data Calculation and Event Exclusion

·
·

temm me more about how session data is calculated and what events form part of the session data and if we can exclude events from session data

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Hi Bradley A., 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

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Certainly! I'd be happy to explain how Mixpanel calculates session data, what events are included, and how you can exclude certain events from session calculations.Mixpanel computes sessions automatically based on the events you send to the platform. Sessions consist of two virtual events: Session Start and Session End. The way sessions are computed can be configured in three ways: 1. Timeout Based (Default) 2. Event Based 3. Property BasedSessions: Compute sessions based on existing event data provides an overview of these methods.For the default Timeout-Based Sessions: - A session starts when a user performs any event and ends when the user is inactive for a set period (default: 30 minutes). - Any non-excluded event performed within the timeout range will restart the session timeout period. - The maximum session timeout length is 24 hours, and the minimum is one minute.Session Computation Deep-Dive offers more details on how sessions are calculated.Regarding events that form part of session data: - By default, all events sent to Mixpanel are included in session calculations, except for excluded events. - Session Events automatically have properties like Session Duration (Seconds), Session Event Count, Session Start Event Name, and Session End Event Name.As for excluding events from session data, Mixpanel allows you to exclude certain events from being tracked as part of a session. This is particularly useful for: - Backend API events that don't denote user actions on the site - Events triggered when messages are sent to a user (including push notifications) - Events triggered when a message is received - Events tracked server-side, such as monthly membership payments not associated with a specific user action - Events related to API activityExcluded Events provides more information on this topic.It's worth noting that Mixpanel API events are excluded by default, but external API events (like messages sent through another program) are not automatically excluded.You can configure these exclusions in your project settings to ensure the validity of your session metrics. Remember that custom events are not supported for exclusions, but you can exclude the events that make up a custom event instead.

    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.