To delete all events from a specific user, you should use Mixpanel’s GDPR/CCPA deletion tools, which delete all data (events + profile) tied to that user’s distinct_id.You have two options: ---
1. Delete via Mixpanel UI (Data & Privacy)
1. In Mixpanel, go to Organization Settings → Data & Privacy.
2. Click Request Deletion.
3. Choose GDPR (or CCPA) as type.
4. Select the Project.
5. Choose Single user and enter the user’s distinct_id (or upload a CSV of multiple distinct_ids, max 500 per request).
6. Submit the request. “A GDPR deletion includes all data connected to the requested distinct_id.” [End user requests UI]Only organization owners and admins can submit these requests. [End user data mgmt]---
2. Delete via GDPR/CCPA Deletion API
1. Generate a GDPR OAuth token from Profile & Preferences → Data & Privacy (available to project owner / admin as described). [End user data mgmt; Privacy overview]
2. Call the Create a Deletion Task endpoint with that user’s distinct_id: LBKScurl "[https://mixpanel.com/api/app/data-deletions/v3.0/?token=YOUR_PROJECT_TOKEN](https://mixpanel.com/api/app/data-deletions/v3.0/?token=YOUR_PROJECT_TOKEN)" \ -H "Authorization: Bearer YOUR_OAUTH_TOKEN" \ -d '{ "compliance_type": "GDPR", "distinct_ids": ["USER_DISTINCT_ID"] }'LBKSThis “will schedule a deletion job that will delete all data, including events and user profile data, for the users specified by distinct_ids.” [GDPR API deletion]---
Notes
- Requests can take up to several weeks to process. [End user data mgmt] - If you only want to delete a subset of events (e.g., spam, bad implementation), use Data Deletion under Project Settings, but that is not distinct_id–based and is intended for problematic data, not per-user deletion. [Data clean-up]
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! 📚
To submit an end-user data deletion request in the Mixpanel UI, you must be: - An Organization Owner or Organization Admin (only these roles can access or submit end user export or deletion requests). [End user data mgmt] - And you must be eligible to generate a GDPR OAuth token, which applies if you are: - The Project Owner, or - A Project Owner or Admin of a project that supports team member roles. [Privacy overview; End user data mgmt]If you don’t have these roles, you’ll need someone with Organization Owner/Admin and appropriate project role (Owner/Admin) to perform the deletion.
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! 📚
To fully remove a single user’s data and stop collecting any new data for them, you need to do two things: ---
1. Stop future tracking for that user
Use the opt-out methods in the client-side SDK(s) you use. Once opted out, no new data will be sent for that user; SDK calls like track and identify will be ignored for them.[Protecting data]**JavaScript example:** js // When user revokes consent / opts out: mixpanel.opt_out_tracking();LBKSYou can also initialize the JS SDK with users opted-out by default, and only opt them in after consent: js mixpanel.init('YOUR_PROJECT_TOKEN', { opt_out_tracking_by_default: true }); // later, once user consents: mixpanel.opt_in_tracking();LBKS[Protecting data]For Unity, use: LBKS// Opt user out of tracking and local storage Mixpanel.OptOutTracking();LBKS[Unity privacy]Remember: opt-out in the client SDK does not affect any server-side tracking you might be doing; you must stop sending server-side events for that user yourself.[Protecting data]---
2. Delete existing data for that user
You have two supported options:
A. Submit a deletion request in the Mixpanel UI
Only org Owners/Admins can do this.[End user data mgmt]1. In Mixpanel, go to Settings → Organization Settings → Data & Privacy.
2. Click Request Deletion.
3. Choose GDPR or CCPA.
4. Select the Project.
5. Choose:
- Single user and enter that user’s distinct_id, or
- Multiple users and upload a CSV of distinct_ids (up to 500 per request).
6. Submit the request.A GDPR deletion will delete all data connected to that distinct_id (events and profile data).[End user data form]
B. Use the GDPR/CCPA Deletion API (programmatic)
1. Generate a GDPR OAuth token under Profile & Preferences → Data & Privacy (must be Project Owner/Admin).[End user data mgmt]
2. Call the deletion endpoint with that user’s distinct_id: LBKScurl "[https://mixpanel.com/api/app/data-deletions/v3.0/?token=YOUR_PROJECT_TOKEN](https://mixpanel.com/api/app/data-deletions/v3.0/?token=YOUR_PROJECT_TOKEN)" \ -H "Authorization: Bearer YOUR_OAUTH_TOKEN" \ -d '{ "compliance_type": "GDPR", "distinct_ids": ["USER_DISTINCT_ID"] }'LBKSThis schedules deletion of all events and profile data for that user in that project.[GDPR API]---
Important notes
- Opting out stops future collection but doesn’t remove past data; deletion removes past data but doesn’t prevent future data collection unless you also opt the user out and/or stop server-side sends.[Opt-out users] - Deletion requests can take up to several weeks to complete.[End user data mgmt]
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.
Hi Luisa S., 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 available Mixpanel MCP documentation and blog posts do not mention an error like Attempt to overwrite 'args' in LogRecord, nor any known MCP backend issue with get_projects, get_events, or get_issues when used from Cursor.[MCP overview][MCP troubleshooting]The documented MCP “Common Issues” are limited to Node.js missing, authorization problems, desktop app glitches, and free-user limitations, none of which match this error.[MCP troubleshooting] The implementation steps for Cursor only describe configuring mcpServers with npx mcp-remote and completing OAuth, with no mention of this logging-related failure.[MCP implementation]Because of that, I can’t confirm from the docs whether this is: - a Mixpanel MCP server bug, or
- an issue in Cursor’s MCP client / mcp-remote / local environment (the error string looks like a client‑side logging problem, but this is not documented).Documented next steps for MCP issues are generic: ensure Node is installed, re‑run authorization, and restart the desktop app.[MCP troubleshooting] There is no official workaround or configuration change in the docs for your specific error.Given the lack of coverage in the knowledge sources, the best documented guidance I can offer is: - Double‑check you followed the Cursor setup and OAuth flow exactly as described in the MCP “Option 3: Cursor” section (including data residency URL, scopes, and mcpServers config).[MCP implementation]
- If the problem persists, this specific error is not documented; you’ll likely need to contact Mixpanel support or your CSM and reference the MCP beta docs and your environment (Cursor + MCP + mcp-remote), since MCP is explicitly in beta.[MCP overview]So: this exact error is not listed as a known MCP backend issue in the docs, and no official workaround is documented.
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.
Hi Kasper W., 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
You can do this in a few different ways depending on where you’re querying from.
1. Using Data Pipelines (SQL on your warehouse)
If your Mixpanel data is in Snowflake / BigQuery via Data Pipelines, you can write SQL that: - Buckets events by day (in your project timezone)
- Counts events per user per daySnowflake example (single events table): [Snowflake queries]LBKSSELECT TO_DATE(CONVERT_TIMEZONE('UTC','<PROJECT_TIMEZONE> ', time)) AS event_date, distinct_id, COUNT(**) AS event_count FROM <DB_NAME> .<SCHEMA_NAME> .MP_MASTER_EVENT WHERE event_name = 'your event name' GROUP BY event_date, distinct_id ORDER BY event_date, distinct_id;LBKSBigQuery example (single events table): [BigQuery queries]LBKSSELECT DATE(time, '<PROJECT_TIMEZONE> ') AS event_date, distinct_id, COUNT(**) AS event_count FROM `<PROJECT_DATASET> .mp_master_event` WHERE event_name = 'your event name' GROUP BY event_date, distinct_id ORDER BY event_date, distinct_id;LBKSThis gives you: one row per user per day with the number of times they did the event on that day.
2. Using JQL (custom JS query)
You can also do this with JQL by: - Fetching events with Events({ from_date, to_date })
- Grouping by user and by day using groupByUser with an additional key (day) [groupByUser].Example pattern (simplified): js function main() { return Events({ from_date: "2025-01-01", to_date: "2025-01-07", event_selectors: [{ event: "your event name" }] }) .groupByUser([getDay], function(count, events) { count = count || 0; return count + events.length; // number of events for that user on that day }); }LBKSfunction getDay(event) { return (new Date(event.time)).toISOString().split('T')[0]; // YYYY-MM-DD }LBKSEach result row’s key will be [distinct_id, "YYYY-MM-DD"] and value will be the count for that user on that day. [groupByUser]---If you tell me whether you’re using Data Pipelines (and which warehouse) or JQL, I can adapt the exact query for you.
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! 📚
