Skip to content

Commit

Permalink
fix: added username in bulk email optout event (#35439)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadadeeltajamul authored Sep 9, 2024
1 parent 92c8949 commit a75dd0e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions lms/djangoapps/bulk_email/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,16 @@ def opt_out_email_updates(request, token, course_id):
course_id,
)

tracker.emit(
'edx.bulk_email.opt_out',
{
'course_id': course_id,
'user_id': user.id,
}
)
event_name = 'edx.bulk_email.opt_out'
event_data = {
"username": user.username,
"user_id": user.id,
"course_id": course_id,
}
with tracker.get_tracker().context(event_name, event_data):
tracker.emit(
event_name,
event_data
)

return render_to_response('bulk_email/unsubscribe_success.html', context)

0 comments on commit a75dd0e

Please sign in to comment.