From bf8949fcbe534e9411ae2e7ae188dbaa132929b8 Mon Sep 17 00:00:00 2001 From: adeelehsan Date: Tue, 23 Feb 2021 21:49:22 +0500 Subject: [PATCH] account activation event added VAN-390 --- common/djangoapps/student/views/management.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py index ea2ce14465..25b3fd9d5c 100644 --- a/common/djangoapps/student/views/management.py +++ b/common/djangoapps/student/views/management.py @@ -94,6 +94,7 @@ REGISTRATION_UTM_PARAMETERS = { 'utm_content': 'registration_utm_content', } REGISTRATION_UTM_CREATED_AT = 'registration_utm_created_at' +USER_ACCOUNT_ACTIVATED = 'edx.user.account.activated' def csrf_token(context): @@ -529,6 +530,13 @@ def activate_account(request, key): # Success message for logged in users. message = _('{html_start}Success{html_end} You have activated your account.') + tracker.emit( + USER_ACCOUNT_ACTIVATED, + { + "user_id": registration.user.id, + } + ) + if not request.user.is_authenticated: # Success message for logged out users message = _(