fix: fire event only if the from_email property is true [VAN-1060] (#30904)
This commit is contained in:
committed by
GitHub
parent
59ac166d6d
commit
1bb6c3ed0d
@@ -100,7 +100,12 @@ def user_track(request):
|
||||
|
||||
# TODO: VAN-1052: This event is added to track the KPIs for A/B experiment.
|
||||
# Remove it after the experiment has been paused.
|
||||
if name == 'edx.course.home.resume_course.clicked' and request.user:
|
||||
if (
|
||||
name == 'edx.course.home.resume_course.clicked' and
|
||||
data.get('from_email') and
|
||||
data.get('event_type') == 'start' and
|
||||
request.user
|
||||
):
|
||||
optimizely_client = OptimizelyClient.get_optimizely_client()
|
||||
if optimizely_client:
|
||||
optimizely_client.track('user_start_course_click', str(request.user.id))
|
||||
|
||||
Reference in New Issue
Block a user