always include num_courses in the event
This commit is contained in:
@@ -207,13 +207,11 @@ def _track_message_sent(site, user, msg):
|
||||
'send_uuid': msg.send_uuid,
|
||||
}
|
||||
course_ids = msg.context.get('course_ids', [])
|
||||
properties['num_courses'] = len(course_ids)
|
||||
if len(course_ids) > 0:
|
||||
properties['course_ids'] = course_ids[:10]
|
||||
properties['primary_course_id'] = course_ids[0]
|
||||
|
||||
if len(course_ids) > 1:
|
||||
properties['num_courses'] = len(course_ids)
|
||||
|
||||
analytics.track(
|
||||
user_id=user.id,
|
||||
event='edx.bi.email.sent',
|
||||
|
||||
Reference in New Issue
Block a user