How can I use Data Deletion to delete events based on a user property (e.g. email)
Hi Xin Y., 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
Based on the knowledge sources provided, it appears that Mixpanel's Data Deletion feature doesn't directly support filtering by user properties like email. The Data Deletion tool allows you to delete events based on event properties and time ranges, but not by distinct IDs or user profile properties.For deleting data associated with specific users (identified by their email or other user properties), you should use the GDPR/CCPA API instead. This API allows you to delete all data associated with specific distinct IDs.Here's how you can delete user data based on email or other user identifiers: 1. First, you'll need to identify the distinct IDs associated with the user emails you want to delete.2. Then use the GDPR/CCPA API to delete all data for those distinct IDs:
- Generate an OAuth token from your Account Settings
- Use the deletion API endpoint: [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)>
- Include the distinct IDs in your requestExample API request: 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":"CCPA", "distinct_ids":["user_distinct_id"]}'LBKS
This will delete all data, including events and user profile data, for the specified distinct IDs. The deletion process may take up to 30 days to complete.For more information about the GDPR/CCPA API for data deletion, you can refer to the GDPR and CCPA API 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.