Skip to content
Snippets Groups Projects
Unverified Commit 3f0aa42d authored by Zainab Amir's avatar Zainab Amir Committed by GitHub
Browse files

feat: add activation link to registration event (#28513)

Added activation key to the registration event to be used by braze.
Specifically it will be used by activation reminder emails.

VAN-693
parent 337fdc50
No related branches found
No related tags found
No related merge requests found
......@@ -245,7 +245,7 @@ def create_account_with_params(request, params):
except Exception: # pylint: disable=broad-except
log.exception(f"Enable discussion notifications failed for user {user.id}.")
_track_user_registration(user, profile, params, third_party_provider)
_track_user_registration(user, profile, params, third_party_provider, registration)
# Announce registration
REGISTER_USER.send(sender=None, user=user, registration=registration)
......@@ -321,7 +321,7 @@ def _link_user_to_third_party_provider(
return third_party_provider, running_pipeline
def _track_user_registration(user, profile, params, third_party_provider):
def _track_user_registration(user, profile, params, third_party_provider, registration):
""" Track the user's registration. """
if hasattr(settings, 'LMS_SEGMENT_KEY') and settings.LMS_SEGMENT_KEY:
identity_args = [
......@@ -354,6 +354,7 @@ def _track_user_registration(user, profile, params, third_party_provider):
'is_education_selected': bool(profile.level_of_education_display),
'is_goal_set': bool(profile.goals),
'total_registration_time': round(float(params.get('totalRegistrationTime', '0'))),
'activation_key': registration.activation_key if registration else None,
}
# DENG-803: For segment events forwarded along to Hubspot, duplicate the `properties` section of
# the event payload into the `traits` section so that they can be received. This is a temporary
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment