Skip to content

Commit

Permalink
Signup: Add alternative theme selection AB test
Browse files Browse the repository at this point in the history
Signup: Change the commence date for default theme A/B test
  • Loading branch information
iamtakashi committed Feb 15, 2016
1 parent 4eb5e19 commit af0009c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
9 changes: 9 additions & 0 deletions client/lib/abtest/active-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,13 @@ module.exports = {
},
defaultVariation: 'original'
},
altThemes: {
datestamp: '20160215',
variations: {
original: 20,
altThemes: 20,
notTested: 60
},
defaultVariation: 'original'
},
};
24 changes: 23 additions & 1 deletion client/signup/config/flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var assign = require( 'lodash/object/assign' ),
var config = require( 'config' ),
stepConfig = require( './steps' ),
abtest = require( 'lib/abtest' ).abtest,
getABTestVariation = require( 'lib/abtest' ).getABTestVariation,
user = require( 'lib/user' )();

function getCheckoutDestination( dependencies ) {
Expand Down Expand Up @@ -172,7 +173,21 @@ const flows = {
destination: getCheckoutDestination,
description: 'Signup flow for free trials',
lastModified: '2015-12-18'
}
},

'website-altthemes': {
steps: [ 'survey', 'altthemes', 'domains', 'plans', 'user' ],
destination: getCheckoutDestination,
description: 'Alternative theme selection for the users who clicked "Create Website" on the two-button homepage.',
lastModified: '2016-02-12'
},

'blog-altthemes': {
steps: [ 'survey', 'altthemes', 'domains', 'plans', 'user' ],
destination: getCheckoutDestination,
description: 'Alternative theme selection for the users who clicked "Create blog" on the two-button homepage.',
lastModified: '2016-02-12'
},
};

function removeUserStepFromFlow( flow ) {
Expand All @@ -190,6 +205,13 @@ function filterFlowName( flowName ) {
if ( includes( headstartFlows, flowName ) && 'headstart' === abtest( 'headstart' ) ) {
return 'headstart';
}

const altThemesFlows = [ 'blog', 'website' ];
if ( includes( altThemesFlows, flowName ) && 'notTested' === getABTestVariation( 'headstart' ) ) {
if ( 'altThemes' === abtest( 'altThemes' ) ) {
return ( 'blog' === flowName ) ? 'blog-altthemes' : 'website-altthemes';
}
}
return flowName;
}

Expand Down
1 change: 1 addition & 0 deletions client/signup/config/step-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
survey: SurveyStepComponent,
'design-type': DesignTypeComponent,
'themes-headstart': ThemeSelectionComponent,
altthemes: ThemeSelectionComponent,
'domains-with-theme': DomainsStepComponent,
'jetpack-user': UserSignupComponent
};
19 changes: 19 additions & 0 deletions client/signup/config/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,25 @@ module.exports = {
providesDependencies: [ 'theme' ]
},

altthemes: {
stepName: 'altthemes',
props: {
themes: [
{ name: 'Dyad', slug: 'dyad' },
{ name: 'Independent Publisher', slug: 'independent-publisher' },
{ name: 'Sela', slug: 'sela' },
{ name: 'Hemingway Rewritten', slug: 'hemingway-rewritten' },
{ name: 'Twenty Sixteen', slug: 'twentysixteen' },
{ name: 'Penscratch', slug: 'penscratch' },
{ name: 'Edin', slug: 'edin' },
{ name: 'Publication', slug: 'publication' },
{ name: 'Harmonic', slug: 'harmonic' },
],
},
apiRequestFunction: stepActions.setThemeOnSite,
dependencies: [ 'siteSlug' ]
},

'design-type': {
stepName: 'design-type',
providesDependencies: [ 'themes' ]
Expand Down

0 comments on commit af0009c

Please sign in to comment.