Commit 22f268ea by Jason Bau Committed by Joe Blaylock

change user_track to provide default if event* not in REQUEST

parent b3515673
......@@ -60,10 +60,10 @@ def user_track(request):
"session": scookie,
"ip": request.META['REMOTE_ADDR'],
"event_source": "browser",
"event_type": request.REQUEST['event_type'],
"event": request.REQUEST['event'],
"event_type": request.REQUEST.get('event_type','unknown'),
"event": request.REQUEST.get('event','unknown'),
"agent": agent,
"page": request.REQUEST['page'],
"page": request.REQUEST.get('page', 'unknown'),
"time": datetime.datetime.now(UTC).isoformat(),
"host": request.META['SERVER_NAME'],
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment