diff --git a/openedx/core/djangoapps/user_authn/views/login.py b/openedx/core/djangoapps/user_authn/views/login.py index 7d049871266e..90efca4d77f0 100644 --- a/openedx/core/djangoapps/user_authn/views/login.py +++ b/openedx/core/djangoapps/user_authn/views/login.py @@ -360,7 +360,8 @@ def _track_user_login(user, request): { 'category': "conversion", 'label': request.POST.get('course_id'), - 'provider': None + 'provider': None, + 'register_intent': bool(request.POST.get('register_intent')), }, ) diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_login.py b/openedx/core/djangoapps/user_authn/views/tests/test_login.py index 1e8a4c3ed510..599d311f7fef 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_login.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_login.py @@ -1041,6 +1041,7 @@ class LoginSessionViewTest(ApiTestCase, OpenEdxEventsTestMixin): USERNAME = "bob" EMAIL = "bob@example.com" PASSWORD = "password" + REGISTER_INTENT = True @classmethod def setUpClass(cls): @@ -1117,6 +1118,7 @@ def test_login(self, include_analytics, mock_segment): data = { "email": self.EMAIL, "password": self.PASSWORD, + "register_intent": self.REGISTER_INTENT, } if include_analytics: track_label = "edX/DemoX/Fall" @@ -1145,7 +1147,7 @@ def test_login(self, include_analytics, mock_segment): mock_segment.track.assert_called_once_with( expected_user_id, 'edx.bi.user.account.authenticated', - {'category': 'conversion', 'provider': None, 'label': track_label} + {'category': 'conversion', 'provider': None, 'label': track_label, 'register_intent': True} ) def test_login_with_username(self):