From 5edb7b9c87336ef070198b9bc56c56e1d6ac28d3 Mon Sep 17 00:00:00 2001 From: Renzo Lucioni Date: Wed, 5 Nov 2014 23:49:29 -0500 Subject: [PATCH] Track logistration form toggles and password reset form views --- lms/static/js/student_account/views/AccessView.js | 12 ++++++++++-- lms/templates/main.html | 3 +-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lms/static/js/student_account/views/AccessView.js b/lms/static/js/student_account/views/AccessView.js index f9939c46a1..b3ffc8c2e9 100644 --- a/lms/static/js/student_account/views/AccessView.js +++ b/lms/static/js/student_account/views/AccessView.js @@ -1,6 +1,6 @@ var edx = edx || {}; -(function($, _, Backbone, gettext) { +(function($, _, Backbone, gettext, analytics) { 'use strict'; edx.student = edx.student || {}; @@ -125,6 +125,10 @@ var edx = edx || {}; }, resetPassword: function() { + analytics.track('edx.bi.password_reset_form.viewed', { + category: 'user-engagement' + }); + this.element.hide( this.$header ); this.element.hide( $(this.el).find('.form-type') ); this.loadForm('reset'); @@ -135,6 +139,10 @@ var edx = edx || {}; $form = $('#' + type + '-form'), $anchor = $('#' + type + '-anchor'); + analytics.track('edx.bi.' + type + '_form.toggled', { + category: 'user-engagement' + }); + if ( !this.form.isLoaded( $form ) ) { this.loadForm( type ); } @@ -170,4 +178,4 @@ var edx = edx || {}; } }); -})(jQuery, _, Backbone, gettext); +})(jQuery, _, Backbone, gettext, analytics); diff --git a/lms/templates/main.html b/lms/templates/main.html index 4099d3cc8f..f9ec256b90 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -110,6 +110,7 @@ <%include file="widgets/optimizely.html" /> + <%include file="widgets/segment-io.html" /> @@ -151,8 +152,6 @@ % endif <%block name="js_extra"/> - - <%include file="widgets/segment-io.html" />