diff --git a/common/lib/xmodule/xmodule/js/src/sequence/display.coffee b/common/lib/xmodule/xmodule/js/src/sequence/display.coffee index 3e371de439..0e4c9788ba 100644 --- a/common/lib/xmodule/xmodule/js/src/sequence/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/sequence/display.coffee @@ -111,11 +111,6 @@ class @Sequence if (1 <= new_position) and (new_position <= @num_contents) Logger.log "seq_goto", old: @position, new: new_position, id: @id - analytics.track "Sequential Goto", - old: @position - new: new_position - id: @id - # On Sequence chage, destroy any existing polling thread # for queued submissions, see ../capa/display.coffee if window.queuePollerID @@ -132,22 +127,12 @@ class @Sequence Logger.log "seq_next", old: @position, new: new_position, id: @id @render new_position - analytics.track "Sequential Next", - old: @position - new: new_position - id: @id - previous: (event) => event.preventDefault() new_position = @position - 1 Logger.log "seq_prev", old: @position, new: new_position, id: @id @render new_position - analytics.track "Sequential Previous", - old: @position - new: new_position - id: @id - link_for: (position) -> @$("#sequence-list a[data-element=#{position}]") diff --git a/common/static/coffee/src/logger.coffee b/common/static/coffee/src/logger.coffee index 58395ba831..6da4929fb0 100644 --- a/common/static/coffee/src/logger.coffee +++ b/common/static/coffee/src/logger.coffee @@ -1,5 +1,12 @@ class @Logger + # events we want sent to Segment.io for tracking + SEGMENT_IO_WHITELIST = ["seq_goto", "seq_next", "seq_prev"] + @log: (event_type, data) -> + if event_type in SEGMENT_IO_WHITELIST + # Segment.io event tracking + analytics.track event_type, data + $.getWithPrefix '/event', event_type: event_type event: JSON.stringify(data) diff --git a/lms/envs/common.py b/lms/envs/common.py index ef590a5149..2c36c7e0c3 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -102,7 +102,7 @@ MITX_FEATURES = { # Staff Debug tool. 'ENABLE_STUDENT_HISTORY_VIEW': True, - # segment.io for LMS--need to explicitly turn it on on production. + # segment.io for LMS--need to explicitly turn it on for production. 'SEGMENT_IO_LMS': False, # Enables the student notes API and UI.