Reduced how much we're sending to Mixpanel. Turned off experimental languages A/B test.

This commit is contained in:
Nick Winter 2014-11-20 20:31:17 -08:00
parent 33ef8f9760
commit e97ba54c94
6 changed files with 11 additions and 33 deletions

View file

@ -62,14 +62,14 @@ module.exports = class LevelSetupManager extends CocoClass
@inventoryModal.didReappear()
@inventoryModal.onShown()
@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: ->
@options.parent.openModalView(@heroesModal)
@heroesModal.render()
@heroesModal.didReappear()
@inventoryModal.endHighlight()
window.tracker?.trackEvent 'Play Level Modal', Action: 'Choose Hero'
window.tracker?.trackEvent 'Play Level Modal', Action: 'Choose Hero', ['Google Analytics']
onInventoryModalPlayClicked: ->
@navigatingToPlay = true

View file

@ -131,19 +131,6 @@ module.exports = class User extends CocoModel
application.tracker.identify 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.
# 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

View file

@ -436,7 +436,7 @@ module.exports = class InventoryModal extends ModalView
hasGoneFullScreenOnce = true
@updateConfig =>
@trigger? 'play-click'
window.tracker?.trackEvent 'Play Level Modal', Action: 'Play'
window.tracker?.trackEvent 'Play Level Modal', Action: 'Play', ['Google Analytics']
updateConfig: (callback, skipSessionSave) ->
sessionHeroConfig = @options.session.get('heroConfig') ? {}

View file

@ -61,7 +61,7 @@ module.exports = class RootView extends CocoView
onClickAnchor: (e) ->
return if @destroyed
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
showLoading: ($el) ->

View file

@ -50,7 +50,7 @@ module.exports = class WorldMapView extends RootView
@hadEverChosenHero = me.get('heroConfig')?.thangType
@listenTo me, 'change:purchased', -> @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: ->
@setupManager?.destroy()
@ -154,7 +154,7 @@ module.exports = class WorldMapView extends RootView
levelElement = $(target).parents('.level')
levelID = levelElement.data('level-id')
@startLevel levelElement
window.tracker?.trackEvent 'World Map', levelID: firstLevelID, directFirstGroup: testGroup
window.tracker?.trackEvent 'World Map', levelID: firstLevelID, directFirstGroup: testGroup, ['Google Analytics']
else
@ABTestSkipHighlight = false
@ -184,12 +184,12 @@ module.exports = class WorldMapView extends RootView
levelElement = $(e.target).parents('.level')
levelID = levelElement.data('level-id')
@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) ->
levelElement = $(e.target).parents('.level-info-container')
@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) ->
@setupManager?.destroy()

View file

@ -78,20 +78,11 @@ module.exports = class PlayHeroesModal extends ModalView
{id: 'python', name: "Python (#{$.i18n.t('choose_hero.default')})"}
{id: 'javascript', name: 'JavaScript'}
{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) ->
direction = e.direction # 'left' or 'right'
heroItem = $(e.relatedTarget)