Add explicit track event for viewing teacher trial

We want to explicitly track views before submit.
This commit is contained in:
Matt Lott 2016-01-26 10:32:39 -08:00
parent 80466f5e9d
commit b3e5d8f650

View file

@ -25,6 +25,9 @@ module.exports = class TeachersFreeTrialView extends RootView
@listenToOnce @existingRequests, 'sync', =>
@fetchingData = false
@render?()
existingRequest = @existingRequests.at(0)
if existingRequest?.get('status') isnt 'submitted' and existingRequest?.get('status') isnt 'approved'
window.tracker?.trackEvent 'View Trial Request', category: 'Teachers', label: 'View Trial Request', ['Mixpanel']
@supermodel.loadCollection(@existingRequests, 'own_trial_requests', {cache: false})
onClickTextBox: (e) ->