mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-12 08:41:46 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
f797154796
2 changed files with 9 additions and 9 deletions
|
@ -96,7 +96,7 @@ module.exports = class Tracker extends CocoClass
|
||||||
|
|
||||||
trackPageView: (includeIntegrations=[]) ->
|
trackPageView: (includeIntegrations=[]) ->
|
||||||
includeMixpanel = (name) ->
|
includeMixpanel = (name) ->
|
||||||
mixpanelIncludes = ['', 'schools', 'play', 'play/level/dungeons-of-kithgard']
|
mixpanelIncludes = []
|
||||||
name in mixpanelIncludes or /courses|students|teachers/ig.test(name)
|
name in mixpanelIncludes or /courses|students|teachers/ig.test(name)
|
||||||
|
|
||||||
name = Backbone.history.getFragment()
|
name = Backbone.history.getFragment()
|
||||||
|
|
|
@ -62,42 +62,42 @@ module.exports = class NewHomeView extends RootView
|
||||||
super()
|
super()
|
||||||
|
|
||||||
onClickLearnMoreLink: ->
|
onClickLearnMoreLink: ->
|
||||||
window.tracker?.trackEvent 'Homepage Click Learn More', category: 'Homepage', ['Mixpanel']
|
window.tracker?.trackEvent 'Homepage Click Learn More', category: 'Homepage', []
|
||||||
@scrollToLink('#classroom-in-box-container')
|
@scrollToLink('#classroom-in-box-container')
|
||||||
|
|
||||||
onClickPlayButton: (e) ->
|
onClickPlayButton: (e) ->
|
||||||
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel']
|
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', []
|
||||||
|
|
||||||
onClickRequestDemo: (e) ->
|
onClickRequestDemo: (e) ->
|
||||||
@playSound 'menu-button-click'
|
@playSound 'menu-button-click'
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopImmediatePropagation()
|
e.stopImmediatePropagation()
|
||||||
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel']
|
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', []
|
||||||
if me.isTeacher()
|
if me.isTeacher()
|
||||||
application.router.navigate '/teachers/update-account', trigger: true
|
application.router.navigate '/teachers/update-account', trigger: true
|
||||||
else
|
else
|
||||||
application.router.navigate '/teachers/demo', trigger: true
|
application.router.navigate '/teachers/demo', trigger: true
|
||||||
|
|
||||||
onClickSetupClass: (e) ->
|
onClickSetupClass: (e) ->
|
||||||
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel']
|
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', []
|
||||||
application.router.navigate("/teachers/classes", { trigger: true })
|
application.router.navigate("/teachers/classes", { trigger: true })
|
||||||
|
|
||||||
onClickStudentButton: (e) ->
|
onClickStudentButton: (e) ->
|
||||||
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel']
|
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', []
|
||||||
|
|
||||||
onClickTeacherButton: (e) ->
|
onClickTeacherButton: (e) ->
|
||||||
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel']
|
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', []
|
||||||
if me.isTeacher()
|
if me.isTeacher()
|
||||||
application.router.navigate('/teachers', { trigger: true })
|
application.router.navigate('/teachers', { trigger: true })
|
||||||
else
|
else
|
||||||
@scrollToLink('.request-demo-row', 600)
|
@scrollToLink('.request-demo-row', 600)
|
||||||
|
|
||||||
onClickViewProfile: (e) ->
|
onClickViewProfile: (e) ->
|
||||||
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel']
|
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', []
|
||||||
application.router.navigate("/user/#{me.getSlugOrID()}", { trigger: true })
|
application.router.navigate("/user/#{me.getSlugOrID()}", { trigger: true })
|
||||||
|
|
||||||
onClickWikiButton: (e) ->
|
onClickWikiButton: (e) ->
|
||||||
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel']
|
window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', []
|
||||||
window.location.href = 'https://sites.google.com/a/codecombat.com/teacher-guides/course-guides'
|
window.location.href = 'https://sites.google.com/a/codecombat.com/teacher-guides/course-guides'
|
||||||
|
|
||||||
afterRender: ->
|
afterRender: ->
|
||||||
|
|
Loading…
Reference in a new issue