Skip to content

Commit cbdd328

Browse files
committed
src/goSurvey: double survey probability and send half to v2 survey
Change-Id: I1fc2664d7f28bf2653dc60c3fe468c04802e2306 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/320431 Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]>
1 parent 4510773 commit cbdd328

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/goSurvey.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ export function shouldPromptForSurvey(now: Date, cfg: SurveyConfig): SurveyConfi
108108
// the user.
109109
// Probability is set based on the # of responses received, and will be
110110
// decreased if we begin receiving > 200 responses/month.
111-
const probability = 0.03;
111+
// Doubled the probability for survey v2 experiment.
112+
// TODO(hyangah): switch back to 0.03.
113+
const probability = 0.03 * 2;
112114
cfg.promptThisMonth = Math.random() < probability;
113115
if (cfg.promptThisMonth) {
114116
// end is the last day of the month, day is the random day of the
@@ -149,11 +151,11 @@ Could you help us improve this extension by filling out a 1-2 minute survey abou
149151
cfg.prompt = true;
150152
const goplsEnabled = latestConfig.enabled;
151153
const usersGoplsVersion = await getLocalGoplsVersion(latestConfig);
152-
await vscode.env.openExternal(
153-
vscode.Uri.parse(
154-
`https://google.qualtrics.com/jfe/form/SV_ekAdHVcVcvKUojX?usingGopls=${goplsEnabled}&gopls=${usersGoplsVersion}&extid=${extensionId}`
155-
)
156-
);
154+
const surveyURL =
155+
Math.random() < 0.5
156+
? `https://google.qualtrics.com/jfe/form/SV_ekAdHVcVcvKUojX?usingGopls=${goplsEnabled}&gopls=${usersGoplsVersion}&extid=${extensionId}` // v1
157+
: `https://google.qualtrics.com/jfe/form/SV_8kbsnNINPIQ2QGq?usingGopls=${goplsEnabled}&gopls=${usersGoplsVersion}&extid=${extensionId}`; // v2
158+
await vscode.env.openExternal(vscode.Uri.parse(surveyURL));
157159
}
158160
break;
159161
case 'Not now':

0 commit comments

Comments
 (0)