From 773810e1763ae2c9b27e4da8f0f61f9fcdf04592 Mon Sep 17 00:00:00 2001 From: Zainab Amir Date: Mon, 1 Mar 2021 13:03:07 +0500 Subject: [PATCH] VAN-367: Capture optional fields usage (#26775) --- openedx/core/djangoapps/user_authn/views/register.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/user_authn/views/register.py b/openedx/core/djangoapps/user_authn/views/register.py index 97a51f0492..19eadf0d6d 100644 --- a/openedx/core/djangoapps/user_authn/views/register.py +++ b/openedx/core/djangoapps/user_authn/views/register.py @@ -342,7 +342,13 @@ def _track_user_registration(user, profile, params, third_party_provider): # ..pii: Learner email is sent to Segment in following line and will be associated with analytics data. 'email': user.email, 'label': params.get('course_id'), - 'provider': third_party_provider.name if third_party_provider else None + 'provider': third_party_provider.name if third_party_provider else None, + 'optional_fields': bool( + profile.goals + or profile.level_of_education_display + or profile.gender_display + or profile.year_of_birth + ) }, )