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

Commit

Permalink
Increase the probability to show survey (#562)
Browse files Browse the repository at this point in the history
* Increase the probability to show survey

* fix gts error
  • Loading branch information
lirenhe committed Jan 21, 2019
1 parent 194bee5 commit 494f8fc
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 494f8fc

Please sign in to comment.