Commit 5edb7b9c by Renzo Lucioni

Track logistration form toggles and password reset form views

parent 8a0507c9
var edx = edx || {}; var edx = edx || {};
(function($, _, Backbone, gettext) { (function($, _, Backbone, gettext, analytics) {
'use strict'; 'use strict';
edx.student = edx.student || {}; edx.student = edx.student || {};
...@@ -125,6 +125,10 @@ var edx = edx || {}; ...@@ -125,6 +125,10 @@ var edx = edx || {};
}, },
resetPassword: function() { resetPassword: function() {
analytics.track('edx.bi.password_reset_form.viewed', {
category: 'user-engagement'
});
this.element.hide( this.$header ); this.element.hide( this.$header );
this.element.hide( $(this.el).find('.form-type') ); this.element.hide( $(this.el).find('.form-type') );
this.loadForm('reset'); this.loadForm('reset');
...@@ -135,6 +139,10 @@ var edx = edx || {}; ...@@ -135,6 +139,10 @@ var edx = edx || {};
$form = $('#' + type + '-form'), $form = $('#' + type + '-form'),
$anchor = $('#' + type + '-anchor'); $anchor = $('#' + type + '-anchor');
analytics.track('edx.bi.' + type + '_form.toggled', {
category: 'user-engagement'
});
if ( !this.form.isLoaded( $form ) ) { if ( !this.form.isLoaded( $form ) ) {
this.loadForm( type ); this.loadForm( type );
} }
...@@ -170,4 +178,4 @@ var edx = edx || {}; ...@@ -170,4 +178,4 @@ var edx = edx || {};
} }
}); });
})(jQuery, _, Backbone, gettext); })(jQuery, _, Backbone, gettext, analytics);
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
<![endif]--> <![endif]-->
<%include file="widgets/optimizely.html" /> <%include file="widgets/optimizely.html" />
<%include file="widgets/segment-io.html" />
<meta name="path_prefix" content="${EDX_ROOT_URL}"> <meta name="path_prefix" content="${EDX_ROOT_URL}">
<meta name="google-site-verification" content="_mipQ4AtZQDNmbtOkwehQDOgCxUUV2fb_C0b6wbiRHY" /> <meta name="google-site-verification" content="_mipQ4AtZQDNmbtOkwehQDOgCxUUV2fb_C0b6wbiRHY" />
...@@ -151,8 +152,6 @@ ...@@ -151,8 +152,6 @@
% endif % endif
<%block name="js_extra"/> <%block name="js_extra"/>
<%include file="widgets/segment-io.html" />
</body> </body>
</html> </html>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment