mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Reduced how much we're sending to Mixpanel. Turned off experimental languages A/B test.
This commit is contained in:
parent
33ef8f9760
commit
e97ba54c94
6 changed files with 11 additions and 33 deletions
|
@ -62,14 +62,14 @@ module.exports = class LevelSetupManager extends CocoClass
|
||||||
@inventoryModal.didReappear()
|
@inventoryModal.didReappear()
|
||||||
@inventoryModal.onShown()
|
@inventoryModal.onShown()
|
||||||
@inventoryModal.setHero(e.hero)
|
@inventoryModal.setHero(e.hero)
|
||||||
window.tracker?.trackEvent 'Play Level Modal', Action: 'Choose Inventory'
|
window.tracker?.trackEvent 'Play Level Modal', Action: 'Choose Inventory', ['Google Analytics']
|
||||||
|
|
||||||
onChooseHeroClicked: ->
|
onChooseHeroClicked: ->
|
||||||
@options.parent.openModalView(@heroesModal)
|
@options.parent.openModalView(@heroesModal)
|
||||||
@heroesModal.render()
|
@heroesModal.render()
|
||||||
@heroesModal.didReappear()
|
@heroesModal.didReappear()
|
||||||
@inventoryModal.endHighlight()
|
@inventoryModal.endHighlight()
|
||||||
window.tracker?.trackEvent 'Play Level Modal', Action: 'Choose Hero'
|
window.tracker?.trackEvent 'Play Level Modal', Action: 'Choose Hero', ['Google Analytics']
|
||||||
|
|
||||||
onInventoryModalPlayClicked: ->
|
onInventoryModalPlayClicked: ->
|
||||||
@navigatingToPlay = true
|
@navigatingToPlay = true
|
||||||
|
|
|
@ -131,19 +131,6 @@ module.exports = class User extends CocoModel
|
||||||
application.tracker.identify directFirstGroup: @directFirstGroup
|
application.tracker.identify directFirstGroup: @directFirstGroup
|
||||||
@directFirstGroup
|
@directFirstGroup
|
||||||
|
|
||||||
getExperimentalLangGroup: ->
|
|
||||||
# Group -1 is not participating
|
|
||||||
# Group 0 is original behavior
|
|
||||||
# Group 1 isn't shown experimental languages in hero modal when launching beginner campaign level
|
|
||||||
# Targetting users with testGroupNumber >= 128
|
|
||||||
unless @experimentalLangGroup?
|
|
||||||
if me.isAdmin() or me.get('testGroupNumber') < 128
|
|
||||||
@experimentalLangGroup = -1
|
|
||||||
else
|
|
||||||
@experimentalLangGroup = me.get('testGroupNumber') % 2
|
|
||||||
application.tracker.identify experimentalLangGroup: @experimentalLangGroup
|
|
||||||
@experimentalLangGroup
|
|
||||||
|
|
||||||
## Test complete; feel free to repurpose for another test.
|
## Test complete; feel free to repurpose for another test.
|
||||||
# https://mixpanel.com/report/227350/segmentation/#action:segment,arb_event:'Saw%20Victory',bool_op:and,chart_type:bar,from_date:-17,segfilter:!((filter:(operand:!('Dungeons%20of%20Kithgard'),operator:%3D%3D),property:level,selected_property_type:string,type:string),(filter:(operand:'',operator:set),property:highlightArrowGroup,selected_property_type:string,type:string),(property:highlightArrowGroup,selected_property_type:string,type:string)),segment_type:string,to_date:0,type:unique,unit:day
|
# https://mixpanel.com/report/227350/segmentation/#action:segment,arb_event:'Saw%20Victory',bool_op:and,chart_type:bar,from_date:-17,segfilter:!((filter:(operand:!('Dungeons%20of%20Kithgard'),operator:%3D%3D),property:level,selected_property_type:string,type:string),(filter:(operand:'',operator:set),property:highlightArrowGroup,selected_property_type:string,type:string),(property:highlightArrowGroup,selected_property_type:string,type:string)),segment_type:string,to_date:0,type:unique,unit:day
|
||||||
# https://www.dropbox.com/s/jot1ikz7nk7jti5/Screenshot%202014-11-18%2008.04.00.png?dl=0
|
# https://www.dropbox.com/s/jot1ikz7nk7jti5/Screenshot%202014-11-18%2008.04.00.png?dl=0
|
||||||
|
|
|
@ -436,7 +436,7 @@ module.exports = class InventoryModal extends ModalView
|
||||||
hasGoneFullScreenOnce = true
|
hasGoneFullScreenOnce = true
|
||||||
@updateConfig =>
|
@updateConfig =>
|
||||||
@trigger? 'play-click'
|
@trigger? 'play-click'
|
||||||
window.tracker?.trackEvent 'Play Level Modal', Action: 'Play'
|
window.tracker?.trackEvent 'Play Level Modal', Action: 'Play', ['Google Analytics']
|
||||||
|
|
||||||
updateConfig: (callback, skipSessionSave) ->
|
updateConfig: (callback, skipSessionSave) ->
|
||||||
sessionHeroConfig = @options.session.get('heroConfig') ? {}
|
sessionHeroConfig = @options.session.get('heroConfig') ? {}
|
||||||
|
|
|
@ -61,7 +61,7 @@ module.exports = class RootView extends CocoView
|
||||||
onClickAnchor: (e) ->
|
onClickAnchor: (e) ->
|
||||||
return if @destroyed
|
return if @destroyed
|
||||||
anchorText = e?.currentTarget?.text
|
anchorText = e?.currentTarget?.text
|
||||||
window.tracker?.trackEvent 'Homepage', Action: anchorText if @id is 'home-view' and anchorText
|
window.tracker?.trackEvent 'Homepage', Action: anchorText, ['Google Analytics'] if @id is 'home-view' and anchorText
|
||||||
@toggleModal e
|
@toggleModal e
|
||||||
|
|
||||||
showLoading: ($el) ->
|
showLoading: ($el) ->
|
||||||
|
|
|
@ -50,7 +50,7 @@ module.exports = class WorldMapView extends RootView
|
||||||
@hadEverChosenHero = me.get('heroConfig')?.thangType
|
@hadEverChosenHero = me.get('heroConfig')?.thangType
|
||||||
@listenTo me, 'change:purchased', -> @renderSelectors('#gems-count')
|
@listenTo me, 'change:purchased', -> @renderSelectors('#gems-count')
|
||||||
@listenTo me, 'change:spent', -> @renderSelectors('#gems-count')
|
@listenTo me, 'change:spent', -> @renderSelectors('#gems-count')
|
||||||
window.tracker?.trackEvent 'World Map', Action: 'Loaded'
|
window.tracker?.trackEvent 'World Map', Action: 'Loaded', ['Google Analytics']
|
||||||
|
|
||||||
destroy: ->
|
destroy: ->
|
||||||
@setupManager?.destroy()
|
@setupManager?.destroy()
|
||||||
|
@ -154,7 +154,7 @@ module.exports = class WorldMapView extends RootView
|
||||||
levelElement = $(target).parents('.level')
|
levelElement = $(target).parents('.level')
|
||||||
levelID = levelElement.data('level-id')
|
levelID = levelElement.data('level-id')
|
||||||
@startLevel levelElement
|
@startLevel levelElement
|
||||||
window.tracker?.trackEvent 'World Map', levelID: firstLevelID, directFirstGroup: testGroup
|
window.tracker?.trackEvent 'World Map', levelID: firstLevelID, directFirstGroup: testGroup, ['Google Analytics']
|
||||||
else
|
else
|
||||||
@ABTestSkipHighlight = false
|
@ABTestSkipHighlight = false
|
||||||
|
|
||||||
|
@ -184,12 +184,12 @@ module.exports = class WorldMapView extends RootView
|
||||||
levelElement = $(e.target).parents('.level')
|
levelElement = $(e.target).parents('.level')
|
||||||
levelID = levelElement.data('level-id')
|
levelID = levelElement.data('level-id')
|
||||||
@startLevel levelElement
|
@startLevel levelElement
|
||||||
window.tracker?.trackEvent 'World Map', Action: 'Play Level', levelID: levelID
|
window.tracker?.trackEvent 'World Map', Action: 'Play Level', levelID: levelID, ['Google Analytics']
|
||||||
|
|
||||||
onClickStartLevel: (e) ->
|
onClickStartLevel: (e) ->
|
||||||
levelElement = $(e.target).parents('.level-info-container')
|
levelElement = $(e.target).parents('.level-info-container')
|
||||||
@startLevel levelElement
|
@startLevel levelElement
|
||||||
window.tracker?.trackEvent 'World Map', Action: 'Play Level', levelID: levelElement.data('level-id')
|
window.tracker?.trackEvent 'World Map', Action: 'Play Level', levelID: levelElement.data('level-id'), ['Google Analytics']
|
||||||
|
|
||||||
startLevel: (levelElement) ->
|
startLevel: (levelElement) ->
|
||||||
@setupManager?.destroy()
|
@setupManager?.destroy()
|
||||||
|
|
|
@ -78,20 +78,11 @@ module.exports = class PlayHeroesModal extends ModalView
|
||||||
{id: 'python', name: "Python (#{$.i18n.t('choose_hero.default')})"}
|
{id: 'python', name: "Python (#{$.i18n.t('choose_hero.default')})"}
|
||||||
{id: 'javascript', name: 'JavaScript'}
|
{id: 'javascript', name: 'JavaScript'}
|
||||||
{id: 'coffeescript', name: 'CoffeeScript'}
|
{id: 'coffeescript', name: 'CoffeeScript'}
|
||||||
|
{id: 'clojure', name: "Clojure (#{$.i18n.t('choose_hero.experimental')})"}
|
||||||
|
{id: 'lua', name: "Lua (#{$.i18n.t('choose_hero.experimental')})"}
|
||||||
|
{id: 'io', name: "Io (#{$.i18n.t('choose_hero.experimental')})"}
|
||||||
]
|
]
|
||||||
|
|
||||||
# A/B test showing experimental languages on first hero select
|
|
||||||
# Group -1 is not participating
|
|
||||||
# Group 0 is original behavior
|
|
||||||
# Group 1 isn't shown experimental languages in hero modal when launching beginner campaign level
|
|
||||||
testGroup = me.getExperimentalLangGroup()
|
|
||||||
if hadEverChosenHero? or testGroup isnt 1
|
|
||||||
@codeLanguageList.push id: 'clojure', name: "Clojure (#{$.i18n.t('choose_hero.experimental')})"
|
|
||||||
@codeLanguageList.push id: 'lua', name: "Lua (#{$.i18n.t('choose_hero.experimental')})"
|
|
||||||
@codeLanguageList.push id: 'io', name: "Io (#{$.i18n.t('choose_hero.experimental')})"
|
|
||||||
unless hadEverChosenHero? or testGroup is -1
|
|
||||||
window.tracker?.trackEvent 'Heroes Modal', experimentalLangGroup: testGroup
|
|
||||||
|
|
||||||
onHeroChanged: (e) ->
|
onHeroChanged: (e) ->
|
||||||
direction = e.direction # 'left' or 'right'
|
direction = e.direction # 'left' or 'right'
|
||||||
heroItem = $(e.relatedTarget)
|
heroItem = $(e.relatedTarget)
|
||||||
|
|
Loading…
Reference in a new issue