Update virtual pageview event categories, general polish

This commit is contained in:
Renzo Lucioni
2014-12-19 11:58:48 -05:00
parent 3d717a895a
commit aeeb45cf57
8 changed files with 33 additions and 14 deletions

View File

@@ -11,6 +11,11 @@ var edx = edx || {};
// Currently, this step does not need to install any event handlers,
// since the displayed information is static.
edx.verify_student.EnrollmentConfirmationStepView = edx.verify_student.StepView.extend({});
edx.verify_student.EnrollmentConfirmationStepView = edx.verify_student.StepView.extend({
postRender: function() {
// Track a virtual pageview, for easy funnel reconstruction.
window.analytics.page( 'verification', this.templateName );
}
});
})( jQuery );

View File

@@ -19,6 +19,9 @@ var edx = edx || {};
errorModel: this.errorModel
}).render();
// Track a virtual pageview, for easy funnel reconstruction.
window.analytics.page( 'verification', this.templateName );
this.listenTo( webcam, 'imageCaptured', function() {
// Track the user's successful image capture
window.analytics.track( 'edx.bi.user.face_image.captured', {

View File

@@ -19,6 +19,9 @@ var edx = edx || {};
errorModel: this.errorModel
}).render();
// Track a virtual pageview, for easy funnel reconstruction.
window.analytics.page( 'verification', this.templateName );
this.listenTo( webcam, 'imageCaptured', function() {
// Track the user's successful image capture
window.analytics.track( 'edx.bi.user.identification_image.captured', {

View File

@@ -21,6 +21,9 @@ var edx = edx || {};
el: $( '.requirements-container', this.el ),
requirements: this.stepData.requirements
}).render();
// Track a virtual pageview, for easy funnel reconstruction.
window.analytics.page( 'verification', this.templateName );
}
});

View File

@@ -17,6 +17,9 @@ var edx = edx || {};
requirements: this.stepData.requirements
}).render();
// Track a virtual pageview, for easy funnel reconstruction.
window.analytics.page( 'payment', this.templateName );
// Update the contribution amount with the amount the user
// selected in a previous screen.
if ( this.stepData.contributionAmount ) {
@@ -84,7 +87,7 @@ var edx = edx || {};
// Marketing needs a way to tell the difference between users
// leaving for the payment processor and users dropping off on
// this page. A virtual pageview can be used to do this.
window.analytics.page( 'verification', 'payment_processor_step' );
window.analytics.page( 'payment', 'payment_processor_step' );
form.submit();
},

View File

@@ -71,18 +71,20 @@ var edx = edx || {};
* those used to track business intelligence events.
*/
postRender: function() {
var $verifyNowButton = $('#verify_now_button'),
$verifyLaterButton = $('#verify_later_button');
// Track a virtual pageview, for easy funnel reconstruction.
window.analytics.page( 'payment', this.templateName );
// Track the user's decision to verify immediately
$( '#verify_now_button' ).on( 'click', function() {
window.analytics.track( 'edx.bi.user.verification.immediate', {
category: 'verification'
});
window.analytics.trackLink( $verifyNowButton, 'edx.bi.user.verification.immediate', {
category: 'verification'
});
// Track the user's decision to defer their verification
$( '#verify_later_button' ).on( 'click', function() {
window.analytics.track( 'edx.bi.user.verification.deferred', {
category: 'verification'
});
window.analytics.trackLink( $verifyLaterButton, 'edx.bi.user.verification.deferred', {
category: 'verification'
});
},

View File

@@ -30,6 +30,9 @@ var edx = edx || {};
// When moving to the next step, submit photos for verification
$( '#next_step_button' ).on( 'click', _.bind( this.submitPhotos, this ) );
// Track a virtual pageview, for easy funnel reconstruction.
window.analytics.page( 'verification', this.templateName );
},
toggleSubmitEnabled: function() {
@@ -38,7 +41,7 @@ var edx = edx || {};
retakePhotos: function() {
// Track the user's intent to retake their photos
window.analytics.track( 'edx.bi.user.verification_images.retaken', {
window.analytics.track( 'edx.bi.user.images.retaken', {
category: 'verification'
});

View File

@@ -47,9 +47,6 @@
this.postRender();
}
).fail( _.bind( this.handleError, this ) );
// Track a virtual pageview, for easy funnel reconstruction.
window.analytics.page( 'verification', this.templateName );
},
handleResponse: function( data ) {