How to check the last seen in Mixpanel kapa.ai
In Mixpanel, “Last seen” usually refers to the user profile property $last_seen, which Mixpanel labels as Updated at in the UI.
What it means
- $last_seen / Updated at = the timestamp of the last time the user profile was updated, not the last event they did. [Updated at meaning; Default user properties]
How to check it
1. Go to Users (User Profiles) in your Mixpanel project.
2. Open any user’s profile.
3. Look for the Updated at (or $last_seen) field in the profile properties table.
Via API / export
If you export profiles via the Engage API, $last_seen is included in the $properties object for each profile. [Exporting profiles]
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! 📚
The knowledge sources indicate that:
- $last_seen (shown as Updated at) is “the last time a user profile property was set or updated” and is only changed by profile updates, not by events or sessions. [Updated at meaning; Default user properties – ingestion]
- Sessions (Session Start / Session End) are virtual events computed from event data, not from profile updates. [Sessions overview; Sessions FAQ]
The docs do not state any automatic link between $last_seen and session starts, even in cases where a session begins when a user property is set. $last_seen will update whenever you perform a profile $set/$set_once (unless $ignore_time: true), regardless of whether that coincides with a session start. [User profiles FAQ; Python people_set example]
So, it is not guaranteed that $last_seen corresponds to “last session start”; it simply reflects the most recent profile update time, which may or may not align with when a session began.
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! 📚
When you update or set a user property at login (for example, right after calling identify and then $set / people.set), Mixpanel will update the profile’s “Updated at” ($last_seen) timestamp.
From the docs:
- $last_seen / Updated at = “the last time a user profile property was set or updated.” It changes only when profile properties are updated via $set / $set_once, not when events or sessions occur. [Updated at meaning; Default user properties – ingestion]
So if, on login, your initialization logic does something like:
``` js mixpanel.identify(userId); mixpanel.people.set({ plan: 'Pro' });
LBKSthat `people.set` will cause `$last_seen` to be updated to that time (unless you explicitly pass `$ignore_time: true` in server-side SDKs). [[Python people_set example](https://docs.mixpanel.com/docs/tracking-methods/sdks/python#storing-user-profiles)]
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! 📚
The knowledge sources do not explicitly state what happens if you call a profile update ($set / people.set) with values that are identical to the existing ones.
What is documented:
- $last_seen (Updated at) is “the last time a user profile property was set or updated.” [Updated at meaning; Default user properties]
- $last_seen is skipped only if you pass $ignore_time: true in the profile update (server-side examples show this). [Python people_set example]
However, the docs do not clarify whether Mixpanel internally checks for value changes before deciding to update $last_seen. So based on the available documentation, I cannot say with certainty whether calling people.set with the same values will or will not update $last_seen.
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! 📚
You can do this in two main ways, depending on whether you want to work inside Mixpanel or via export / JQL.
1. Using JQL (per-user last time of an event)
JQL lets you compute per-user aggregates from events. The event objects have distinct_id, time, and name (event name). [JQL events spec]
To get, for each user, the most recent timestamp of a specific event (e.g. "Purchase"), you can:
``` js function main() { return Events({ from_date: "2025-01-01", to_date: "2025-12-31", event_selectors: [{ event: "Purchase" }] }) .groupByUser(function(state, events) { // state will hold the latest time for this user state = state || null; for (var i = 0; i < events.length; i++) { var t = events[i].time; if (state === null || t > state) { state = t; } } return state; }); }
LBKS`groupByUser` guarantees events for each user are processed in time order, and returns one record per user with their aggregated value. [[groupByUser](https://docs.mixpanel.com/docs/reports/apps/jql#groupbyuseroptional-additional-keys-reducer-functions)]
This gives you:
LBKS```
{
"key": ["<distinct_id> "],
"value": <latest_timestamp_for_that_event>
}
You can then filter this result set (e.g. by date range on value) in your consuming code.
2. Using Raw Export + SQL (outside Mixpanel)
If you export events via the Raw Event Export API or Data Pipelines, each row has event_name, time, and distinct_id. [Raw export API; Common SQL queries]
You can then run a SQL query like:
```
SELECT
distinct_id,
MAX(time) AS last_event_time
FROM
<your dataset> .mp_master_event
WHERE
event_name = 'Purchase'
GROUP BY
distinct_id;
LBKSThis returns **one row per user**, with the timestamp of the **most recent** occurrence of that event. Users with only one such event will still appear once, with that single timestamp.
---
The knowledge sources do not describe an in-UI “last time did event X per user” filter directly; they focus on JQL, raw export, and SQL patterns, so the two approaches above are the documented ways to compute and filter on “last time a specific event was triggered” at the user level.
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.
