Skip to content

Commit 1d406d0

Browse files
committed
setting the experiment version to 2 so that DIY onboarding is always hidden
1 parent 5d42ea3 commit 1d406d0

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

src/OnboardingSPA/steps/TheFork/index.js

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -70,34 +70,20 @@ const TheFork = () => {
7070
} );
7171

7272
const handleExperimentVersion = async () => {
73-
let theForkExperimentVersion = 0;
74-
if ( currentData.sitegen.theForkExperimentVersion !== 0 ) {
75-
// Use an existing experiment version if it exists
76-
setExperimentVersion(
77-
currentData.sitegen.theForkExperimentVersion
78-
);
79-
theForkExperimentVersion =
80-
currentData.sitegen.theForkExperimentVersion;
81-
} else {
82-
// Generate a random experiment version either 1 or 2
83-
theForkExperimentVersion = Math.floor( Math.random() * 2 ) + 1;
84-
setExperimentVersion( theForkExperimentVersion );
85-
73+
// setting the experiment version to 2 so that DIY onboarding is always hidden
74+
const theForkExperimentVersion = 2;
75+
setExperimentVersion( theForkExperimentVersion );
76+
if ( ! currentData.sitegen.theForkExperimentVersion ) {
8677
// Sync that to the store and DB for same version on refresh
87-
currentData.sitegen.theForkExperimentVersion =
88-
theForkExperimentVersion;
78+
currentData.sitegen.theForkExperimentVersion = theForkExperimentVersion;
8979
setCurrentOnboardingData( currentData );
9080
await setFlow( currentData );
91-
const experimentVersionNames = {
92-
1: 'control',
93-
2: 'hidden',
94-
};
9581

9682
// Send an event for the experiment version shown to the user.
9783
sendOnboardingEvent(
9884
new OnboardingEvent(
9985
ACTION_SITEGEN_FORK_AI_EXPERIMENT,
100-
experimentVersionNames[ theForkExperimentVersion ],
86+
'hidden', // this event shows that the DIY onboarding was not shown
10187
null,
10288
null,
10389
CATEGORY_EXPERIMENT

0 commit comments

Comments
 (0)