python - Send mixpanel cookies with server side logging? -


have found way pass mixpanel user cookies through on server side logging events?

i tried passing them args server-side mixpanel.track, didn't work, e.g.

from mixpanel import mixpanel def log_mixpanel(userid,request=none,event=none,args=none):     if args == none:         args = {}     if userid , event:         if request:             cookie in request.cookies:                 if cookie.startswith("mp_"):                     args[cookie]=request.cookies[cookie]         mp = mixpanel(settings.mixpanel_project_token)         mp.track(userid,event,args) 

i try hacking mixpanel python library copy request headers over, i'm wondering if there's friendlier way.

i'm hoping populate many of same fields possible match javascript library's logging, including device. requires copying useragent & other request headers on mixpanel somehow well.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -