Here’s concise, client‑friendly messaging you can use: > At the moment, Mixpanel doesn’t support doing this directly in the UI or via a built‑in report. The only way to achieve this today is to export the raw data and handle the transformation outside of Mixpanel (for example, using Python or SQL).
Concretely, we’d need to: 1. Export the relevant events from Mixpanel using our Export APIs or a one‑time raw data export. [Export methods] 2. Process that export in an external tool (such as Python, a notebook, or your data warehouse) to calculate the “last time per user” logic you’re looking for.
I realize this isn’t as self‑serve as having it directly in Mixpanel, but given the current product capabilities, a manual extract and external manipulation is the only reliable way to get this exact output.
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! 📚
JQL is a Query API feature, not something you “install,” and it’s currently in maintenance mode (Mixpanel recommends using other export/query methods instead). [JQL overview]
Where JQL is and what it is
- JQL is a JavaScript-based query language you run via the Query API (/api/query/jql). [JQL overview; Custom JQL Query]
- In the docs it appears under Reports → Apps → JQL. [Reports – JQL]
How to run JQL
You send a POST request to the JQL endpoint with: - script: your JQL code (must define function main() { ... }).
- params (optional): JSON-encoded object available as global params in your script. [Passing parameters; query-jql spec]Example from the docs using curl: sh curl --request POST \ --url [https://mixpanel.com/api/query/jql](https://mixpanel.com/api/query/jql) \ --header 'accept: application/json' \ --header 'content-type: application/x-www-form-urlencoded' \ --data 'script=function main(){ return Events(params) .groupBy( ["name"], mixpanel.reducer.count() ) } ' \ --data 'params={ "scriptParam": "paramValue" } 'LBKS[Custom JQL Query]You can also keep the script in a file and reference it: sh curl [https://mixpanel.com/api/query/jql](https://mixpanel.com/api/query/jql) \ -u YOUR_API_SECRET: \ --data-urlencode script@my_query.jsLBKS[Custom JQL Query]
Does it require third‑party installation?
- No extra third‑party service is required; you just need a way to make HTTP POST requests (e.g., curl, your own backend, or a script).
- There is a Python helper query_jql in the mixpanel-utils module, but that’s optional; it just wraps the same HTTP call. [mixpanel-utils query_jql]
Important limits / status
- JQL is in maintenance mode; Mixpanel recommends using Export API, Data Pipelines, Engage Query API, or Query API for most new work. [JQL overview; Custom JQL Query] - Limits: max 60 queries/hour, 5 concurrent queries, 2‑minute runtime, 5 GB processed data, 2 GB output. [Custom JQL Query]
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 approximate “last time a specific event was triggered per user” inside Mixpanel using behavioral computed properties and filters/breakdowns, but the docs don’t describe a direct “last event timestamp per user” field you can filter on. I’ll outline what is documented.
1. Use behavioral computed properties (per user)
Behavioral properties let you compute things like “how many times this user did event X in a time range” and then use that as a property in filters/breakdowns. [Computed properties]Two relevant options: - Frequency per User: “number of events performed per user” for a chosen event, over a chosen time range. [Measurements – Frequency per User; Computed properties]
- Time Range – Per Interval: in Insights, the computation is done per chart interval (or over the whole date range for bar/table/pie). [Computed properties]This lets you: 1. In Insights:
- Choose your event (e.g. Purchase).
- Set Measurement to Frequency per User.
- Optionally use filters or breakdowns on this computed property (e.g. “users with Frequency per User > 0 in last 30 days”). [Measurements; Filters]This doesn’t expose the exact last timestamp, but it does let you segment users by whether and how often they did the event in a given window.
2. Use cohorts to capture “did event X in last N days”
You can define a cohort of users who did a specific event in a time window, which effectively uses the most recent occurrence within that window to qualify them. [Cohorts]Steps (conceptually): 1. Go to Cohorts (Users → Cohorts or “Create Custom → Cohort” from a report).
2. Define:
- “Users who did <event> at least 1 time in the last <N> days”.
3. Save the cohort.
4. Use this cohort as:
- A filter in Insights/Funnels/Retention, or
- A breakdown to compare users who did vs. didn’t do the event recently. [Define cohorts; Cohorts in reports]This again doesn’t show the exact last timestamp, but it lets you filter to “users whose last occurrence of this event is within the last N days” (because if they did it at least once in that window, their last time is also in that window).---Because the documentation does not describe a built-in “last event time per user” field or filter, the closest in-UI options are: - Behavioral computed properties (Frequency per User / Aggregate Property per User) to segment by activity level in a time range.
- Cohorts based on “did event X at least once in last N days” to approximate recency.
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; }); }LBKSgroupByUser guarantees events for each user are processed in time order, and returns one record per user with their aggregated value. [groupByUser]This gives you: LBKS{ "key": ["<distinct_id> "], "value": <latest_timestamp_for_that_event> }LBKSYou 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: LBKSSELECT 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.
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! 📚
