Commit 0dea82e4 by Julia Hansbrough Committed by Renzo Lucioni

Analytics should use user.id not anon id

parent a8d07780
......@@ -986,7 +986,7 @@ def login_user(request, error=""): # pylint: disable-msg=too-many-statements,un
# Track the user's sign in
if settings.FEATURES.get('SEGMENT_IO_LMS') and hasattr(settings, 'SEGMENT_IO_LMS_KEY'):
tracking_context = tracker.get_tracker().resolve_context()
analytics.identify(anonymous_id_for_user(user, None), {
analytics.identify(user.id, {
'email': email,
'username': username,
})
......@@ -1461,7 +1461,7 @@ def create_account(request, post_override=None): # pylint: disable-msg=too-many
# Track the user's registration
if settings.FEATURES.get('SEGMENT_IO_LMS') and hasattr(settings, 'SEGMENT_IO_LMS_KEY'):
tracking_context = tracker.get_tracker().resolve_context()
analytics.identify(anonymous_id_for_user(user, None), {
analytics.identify(user.id, {
email: email,
username: username,
})
......
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