what is the $ae_session event?
Hi Tyler T., 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
The $ae_session event (displayed as App Session) is a legacy automatically tracked event available in Mixpanel's mobile SDKs, such as iOS (Swift and Objective-C) [iOS (Swift); iOS (Objective-C)].
Key Details
** Trigger: It executes when a user spends more than 10 seconds in the app [iOS (Swift)].
** Properties: The event includes a Session Length ($ae_session_length) property, which reflects the number of seconds the user spent in that specific session [iOS (Swift); iOS (Objective-C)].
** User Profiles: It also tracks two user profile properties: Total App Sessions ($ae_total_app_sessions) and *Total App Session Length ($ae_total_app_session_length) [iOS (Swift)].
Usage Recommendation
Mixpanel currently does not recommend enabling this event because it relies on client-side state, which can be unreliable. Instead, Mixpanel recommends using its modern Sessions feature, which computes sessions on the fly from existing event data using virtual Session Start and Session End events [Sessions Overview; Troubleshooting FAQs].To ensure these legacy events are disabled, you can set trackAutomaticEvents to false (or NO in Objective-C) during SDK initialization [iOS (Swift); iOS (Objective-C)].
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! đ
Yes, the $ae_session event can show up for Flutter.Because the Mixpanel Flutter SDK wraps around the Android and Swift (iOS) SDKs, it inherits these legacy automatically tracked events [Default Properties]. Specifically regarding Flutter:
** Enabling the Event: You can enable this and other legacy events by setting the flag trackAutomaticEvents: true when initializing the Mixpanel instance [Flutter SDK Documentation].
** Recommendation: Mixpanel does not recommend enabling this feature because these events rely on client-side state and can be unreliable compared to server-side tracking or Mixpanel's modern, automatically computed sessions [Flutter SDK Documentation].
** *Default Behavior: In the standard Flutter initialization example, it is typically disabled by default (trackAutomaticEvents: false) [Flutter Getting Started].If enabled, it will track the same session data (such as session length) as described for the native iOS and Android SDKs [Flutter SDK Documentation].
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! đ
While both $ae_session and Mixpanel's modern Sessions feature aim to measure user activity, they function very differently in how they are triggered, managed, and used.
Comparison Table
Key Contrasts
1. Reliability and Source
** $ae_session: This is a legacy feature that relies on client-side state. Mixpanel generally recommends disabling it because it can be unreliable [Flutter SDK]. ** Mixpanel Sessions: These are "Virtual Events" (Session Start and Session End). They are not sent from your app but are generated by Mixpanel at query time within the UI based on events you are already sending [Troubleshooting FAQs].
2. Configuration and Historical Data
** $ae_session: The logic is hardcoded into the SDK. If you change your mind about what constitutes a "session," you cannot change the data that has already been collected. ** Mixpanel Sessions: Because they are computed on the fly, Project Admins can change the session definition (e.g., changing a timeout from 30 minutes to 1 hour) and it will apply to all historical data immediately [Sessions Overview].
3. Properties and Analysis
** $ae_session: Specifically tracks $ae_session_length and updates user profile properties like Total App Sessions [iOS Objective-C].
** Mixpanel Sessions: Automatically inherits properties from the first event of a session (like utm_source or browser) and provides system properties like Session Duration (Seconds) and Session Event Count [Session Properties].
4. Exporting Data
** $ae_session: As a standard event, it appears in raw event lists and can be exported via API. ** Mixpanel Sessions: Since they are virtual, they do not appear in raw event lists and cannot be exported via API [Troubleshooting FAQs].
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.
