Turned off some completed A/B tests. Fixed an achievement recalculation typo Scott found.

This commit is contained in:
Nick Winter 2014-11-20 21:57:47 -08:00
parent e97ba54c94
commit 2393165d9a
3 changed files with 17 additions and 79 deletions

View file

@ -118,40 +118,4 @@ module.exports = class User extends CocoModel
application.tracker.identify castButtonTextGroup: @castButtonTextGroup application.tracker.identify castButtonTextGroup: @castButtonTextGroup
@castButtonTextGroup @castButtonTextGroup
getDirectFirstGroup: ->
# Group -1 is not participating
# Group 0 is original behavior
# Group 1 goes directly to first level if new user
# Targetting users with testGroupNumber < 128
unless @directFirstGroup?
if me.isAdmin() or me.get('testGroupNumber') >= 128
@directFirstGroup = -1
else
@directFirstGroup = me.get('testGroupNumber') % 2
application.tracker.identify directFirstGroup: @directFirstGroup
@directFirstGroup
## 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
#getHighlightArrowSoundGroup: ->
# return @highlightArrowGroup if @highlightArrowGroup
# group = me.get('testGroupNumber') % 8
# @highlightArrowGroup = switch group
# when 0, 1, 2, 3 then 'sound-off'
# when 4, 5, 6, 7 then 'sound-on'
# @highlightArrowGroup = 'sound-off' if me.isAdmin()
# application.tracker.identify highlightArrowGroup: @highlightArrowGroup unless me.isAdmin()
# @highlightArrowGroup
getKithmazeGroup: ->
return @kithmazeGroup if @kithmazeGroup
group = me.get('testGroupNumber') % 16
@kithmazeGroup = switch group
when 0, 1, 2, 3, 4, 5, 6, 7 then 'the-first-kithmaze'
when 8, 9, 10, 11, 12, 13, 14, 15 then 'haunted-kithmaze'
@kithmazeGroup = 'haunted-kithmaze' if me.isAdmin()
application.tracker.identify kithmazeGroup: @kithmazeGroup unless me.isAdmin()
@kithmazeGroup
tiersByLevel = [-1, 0, 0.05, 0.14, 0.18, 0.32, 0.41, 0.5, 0.64, 0.82, 0.91, 1.04, 1.22, 1.35, 1.48, 1.65, 1.78, 1.96, 2.1, 2.24, 2.38, 2.55, 2.69, 2.86, 3.03, 3.16, 3.29, 3.42, 3.58, 3.74, 3.89, 4.04, 4.19, 4.32, 4.47, 4.64, 4.79, 4.96] tiersByLevel = [-1, 0, 0.05, 0.14, 0.18, 0.32, 0.41, 0.5, 0.64, 0.82, 0.91, 1.04, 1.22, 1.35, 1.48, 1.65, 1.78, 1.96, 2.1, 2.24, 2.38, 2.55, 2.69, 2.86, 3.03, 3.16, 3.29, 3.42, 3.58, 3.74, 3.89, 4.04, 4.19, 4.32, 4.47, 4.64, 4.79, 4.96]

View file

@ -89,7 +89,7 @@ module.exports = class WorldMapView extends RootView
level.x ?= 10 + 80 * Math.random() level.x ?= 10 + 80 * Math.random()
level.y ?= 10 + 80 * Math.random() level.y ?= 10 + 80 * Math.random()
level.locked = index > 0 and not me.ownsLevel level.original level.locked = index > 0 and not me.ownsLevel level.original
window.levelUnlocksNotWorking = true if level.locked and (level.id is @nextLevel or (level.id is 'haunted-kithmaze' and @nextLevel is 'the-first-kithmaze')) # Temporary window.levelUnlocksNotWorking = true if level.locked and level.id is @nextLevel # Temporary
level.locked = false if window.levelUnlocksNotWorking # Temporary; also possible in HeroVictoryModal level.locked = false if window.levelUnlocksNotWorking # Temporary; also possible in HeroVictoryModal
level.locked = false if @levelStatusMap[level.id] in ['started', 'complete'] level.locked = false if @levelStatusMap[level.id] in ['started', 'complete']
level.disabled = false if @levelStatusMap[level.id] in ['started', 'complete'] level.disabled = false if @levelStatusMap[level.id] in ['started', 'complete']
@ -113,7 +113,7 @@ module.exports = class WorldMapView extends RootView
@$el.find('.level').tooltip() @$el.find('.level').tooltip()
@$el.addClass _.string.slugify @terrain @$el.addClass _.string.slugify @terrain
@updateVolume() @updateVolume()
unless window.currentModal or @ABTestSkipHighlight or not @supermodel.finished() unless window.currentModal or not @supermodel.finished()
@highlightElement '.level.next', delay: 500, duration: 60000, rotation: 0, sides: ['top'] @highlightElement '.level.next', delay: 500, duration: 60000, rotation: 0, sides: ['top']
if levelID = @$el.find('.level.next').data('level-id') if levelID = @$el.find('.level.next').data('level-id')
@$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show() @$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show()
@ -138,25 +138,6 @@ module.exports = class WorldMapView extends RootView
if @nextLevel and @levelStatusMap[@nextLevel] is 'complete' if @nextLevel and @levelStatusMap[@nextLevel] is 'complete'
@nextLevel = null @nextLevel = null
@render() @render()
@initABTestAutoFirstLevel()
initABTestAutoFirstLevel: ->
# A/B testing directly navigating to first level
# Excluding admins and users who have already started
# TODO: Cleanup @afterRender when this test is finished
firstLevelID = 'dungeons-of-kithgard'
testGroup = me.getDirectFirstGroup()
unless @nextLevel? or (firstLevelID of @levelStatusMap) or testGroup is -1
@ABTestSkipHighlight = testGroup is 1
if testGroup is 1
target = $("a[data-level-id='" + firstLevelID + "']")
return if $(target).attr('disabled') or $(target).parent().hasClass 'locked'
levelElement = $(target).parents('.level')
levelID = levelElement.data('level-id')
@startLevel levelElement
window.tracker?.trackEvent 'World Map', levelID: firstLevelID, directFirstGroup: testGroup, ['Google Analytics']
else
@ABTestSkipHighlight = false
onClickMap: (e) -> onClickMap: (e) ->
@$levelInfo?.hide() @$levelInfo?.hide()
@ -425,21 +406,21 @@ dungeon = [
x: 85 x: 85
y: 20 y: 20
nextLevels: nextLevels:
continue: 'the-first-kithmaze' continue: 'haunted-kithmaze'
}
{
name: 'The First Kithmaze'
type: 'hero'
id: 'the-first-kithmaze'
original: '5418b9d64c16460000ab9ab4'
description: 'The builders of Kithgard constructed many mazes to confuse travelers.'
x: 78
y: 29
nextLevels:
more_practice: 'descending-further'
continue: 'the-second-kithmaze'
skip_ahead: 'dread-door'
} }
#{
# name: 'The First Kithmaze'
# type: 'hero'
# id: 'the-first-kithmaze'
# original: '5418b9d64c16460000ab9ab4'
# description: 'The builders of Kithgard constructed many mazes to confuse travelers.'
# x: 78
# y: 29
# nextLevels:
# more_practice: 'descending-further'
# continue: 'the-second-kithmaze'
# skip_ahead: 'dread-door'
#}
{ {
name: 'Haunted Kithmaze' name: 'Haunted Kithmaze'
type: 'hero' type: 'hero'
@ -789,10 +770,3 @@ WorldMapView.campaigns = campaigns = [
{id: 'dungeon', name: 'Dungeon Campaign', levels: dungeon } {id: 'dungeon', name: 'Dungeon Campaign', levels: dungeon }
{id: 'forest', name: 'Forest Campaign', levels: forest } {id: 'forest', name: 'Forest Campaign', levels: forest }
] ]
# A/B testing first kithmaze level: The First Kithmaze vs. Haunted Kithmaze
if me.getKithmazeGroup() is 'the-first-kithmaze'
_.remove dungeon, id: 'haunted-kithmaze'
else
_.remove dungeon, id: 'the-first-kithmaze'
_.find(dungeon, id: 'the-raised-sword').nextLevels.continue = 'haunted-kithmaze'

View file

@ -52,7 +52,7 @@ AchievablePlugin = (schema, options) ->
user: userID user: userID
achievement: achievement._id.toHexString() achievement: achievement._id.toHexString()
achievementName: achievement.get 'name' achievementName: achievement.get 'name'
earnedRewarsd: achievement.get 'rewards' earnedRewards: achievement.get 'rewards'
worth = achievement.get('worth') ? 10 worth = achievement.get('worth') ? 10
earnedPoints = 0 earnedPoints = 0