Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ProtonMail/WebClients.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromain sanchez <romain.sanchez@proton.ch>2022-09-23 15:25:43 +0300
committerRichard <richard@protonmail.com>2022-09-28 10:55:01 +0300
commitff9e0a21c68479f0460cc2b02c80caeb592006a1 (patch)
tree5280c52b009f4efe3775e7efe0c43af2aa0d3ef1
parent90296f4694bd13da164a69eec7e5b953645eeac9 (diff)
Improve Simple Login Telemetry dimensions for spam
NAILWEB-3604
-rw-r--r--applications/mail/src/app/hooks/simpleLogin/useSimpleLoginTelemetry.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/applications/mail/src/app/hooks/simpleLogin/useSimpleLoginTelemetry.ts b/applications/mail/src/app/hooks/simpleLogin/useSimpleLoginTelemetry.ts
index c6889a655a..fe05a39d78 100644
--- a/applications/mail/src/app/hooks/simpleLogin/useSimpleLoginTelemetry.ts
+++ b/applications/mail/src/app/hooks/simpleLogin/useSimpleLoginTelemetry.ts
@@ -15,11 +15,14 @@ export const useSimpleLoginTelemetry = () => {
const planTitle = primaryPlan?.Title || PLAN_NAMES[FREE_PLAN.Name as PLANS];
// However, we need to bin the number of message we send to Telemetry
- // '1' => User has 0 or 1 message in spam
+ // '0' => User has 0 messages in spam
+ // '1' => User has 1 message in spam
// '10' => User has 2-10 messages in spam
// '10+' => User has more than 10 messages in spam
const getBinnedMessagesInSpam = (totalMessages: number) => {
- if (totalMessages < 2) {
+ if (totalMessages === 0) {
+ return '0';
+ } else if (totalMessages === 1) {
return '1';
} else if (totalMessages < 11) {
return '10';