How to remove and stop collecting/recording data from one particular user?
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
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.
which permissions i need for this: A. Submit a deletion request in the Mixpanel UI
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 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.
