#init from mixpanel import Mixpanel from config import MIXPANEL_PRO_KEY, MIXPANEL_RETRY_LIMIT mp = Mixpanel(MIXPANEL_PRO_KEY, MIXPANEL_RETRY_LIMIT) #use: #https://docs.mixpanel.com/docs/tracking-methods/sdks/python #in json can be all free use mp.track('USER_ID', 'some_event', { 'plan': 'premium' })