Skip to content

Commit

Permalink
Removed vC experiment branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxcrawford committed Apr 1, 2020
1 parent d45ce46 commit aacb929
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions controllers/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function home(req, res) {
const coinFlipNumber = Math.random() * 100;
const experimentBranch = getExperimentBranch(req, coinFlipNumber);

const isUserInExperiment = (experimentBranch === "vb" || experimentBranch === "vc");
const isUserInExperiment = (experimentBranch === "vb");
const experimentBranchB = (experimentBranch === "vb" && isUserInExperiment);

let featuredBreach = null;
Expand Down Expand Up @@ -72,7 +72,7 @@ function getExperimentBranch(req, sorterNum) {

// If URL param has experimentBranch entry, use that branch;
if (req.query.experimentBranch) {
if (!["va", "vb", "vc"].includes(req.query.experimentBranch)) {
if (!["va", "vb"].includes(req.query.experimentBranch)) {
return false;
}
req.session.experimentBranch = req.query.experimentBranch;
Expand All @@ -82,17 +82,12 @@ function getExperimentBranch(req, sorterNum) {
// If user was already assigned a branch, stay in that branch;
if (req.session.experimentBranch) { return req.session.experimentBranch; }

// Split into three categories
if (sorterNum <= 33.333) {
// Split into two categories
if (sorterNum <= 50) {
req.session.experimentBranch = "vb";
return "vb";
}

if (sorterNum <= 66.666) {
req.session.experimentBranch = "vc";
return "vc";
}

return "va";
}

Expand Down

0 comments on commit aacb929

Please sign in to comment.