Skip to content

Instantly share code, notes, and snippets.

@rousan
Last active November 15, 2019 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rousan/189677a35094918d32fcbab92ca5a98d to your computer and use it in GitHub Desktop.
Save rousan/189677a35094918d32fcbab92ca5a98d to your computer and use it in GitHub Desktop.
This script will delete any profile that hasn't been seen since January 1st, 2019.
  1. Step 1:
pip install mixpanel-api
  1. Step 2:

This script will delete any profile that hasn't been seen since January 1st, 2019.

from mixpanel_api import Mixpanel

mixpanel = Mixpanel('MIXPANEL_SECRET', token='MIXPANEL_TOKEN')

deleted_count = mixpanel.people_delete(query_params={ 'selector' : 'user["$last_seen"]<"2019-01-01T00:00:00"'})
print(deleted_count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment