From 0dea82e43ea609610021e8865ad2890f7da81761 Mon Sep 17 00:00:00 2001 From: Julia Hansbrough Date: Wed, 3 Sep 2014 18:38:53 +0000 Subject: [PATCH] Analytics should use user.id not anon id --- common/djangoapps/student/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index dedd2df743..49df99d4b5 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -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, })