Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.

Increase the probability to show survey #562

Merged
merged 2 commits into from Jan 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/nsat.ts
Expand Up @@ -8,7 +8,7 @@ import {EventNames, GlobalConstants} from './constants';
import {TelemetryProperties, TelemetryContext, TelemetryWorker} from './telemetry';

const NSAT_SURVEY_URL = 'https://www.surveymonkey.com/r/C2928RZ';
const PROBABILITY = 0.5;
const PROBABILITY = 1;
const SESSION_COUNT_THRESHOLD = 2;
const SESSION_COUNT_KEY = 'nsat/sessionCount';
const LAST_SESSION_DATE_KEY = 'nsat/lastSessionDate';
Expand Down Expand Up @@ -40,8 +40,8 @@ export class NSAT {
return;
}

const isCandidate =
globalState.get(IS_CANDIDATE_KEY, false) || Math.random() < PROBABILITY;
const isCandidate = globalState.get(IS_CANDIDATE_KEY, false) ||
Math.random() <= PROBABILITY;

await globalState.update(IS_CANDIDATE_KEY, isCandidate);

Expand Down