Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ANALYTICS] Add analytics metrics for SRP reveal #5559

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions app/core/Analytics/MetaMetrics.events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,18 @@ enum EVENT_NAME {
SCREENSHOT_WARNING = 'Screenshot Warning Displayed',
SCREENSHOT_LEARN_MORE = 'Clicked Screenshot Warning Learn More',
SCREENSHOT_OK = 'Clicked Screenshot Warning OK',

// Reveal SRP Quiz
SRP_REVEAL_QUIZ_PROMPT_SEEN = 'SRP reveal quiz prompt seen',
SRP_REVEAL_START_CTA_SELECTED = 'SRP reveal get started CTA selected',
SRP_REVEAL_FIRST_QUESTION_SEEN = 'SRP reveal first question seen',
SRP_REVEAL_FIRST_QUESTION_WRONG_ANSWER = 'SRP reveal first question answered incorrectly',
SRP_REVEAL_FIRST_QUESTION_RIGHT_ASNWER = 'SRP reveal first question answered correctly',
SRP_REVEAL_SECOND_QUESTION_SEEN = 'SRP reveal second question seen',
SRP_REVEAL_SECOND_QUESTION_WRONG_ANSWER = 'SRP reveal second question answered incorrectly',
SRP_REVEAL_SECOND_QUESTION_RIGHT_ASNWER = 'SRP reveal second question answered correctly',
REVEAL_SRP = 'Reveal SRP',
SRP_COPIED = 'SRP copied',
}

const events = {
Expand Down Expand Up @@ -479,6 +491,32 @@ const events = {
SCREENSHOT_WARNING: generateOpt(EVENT_NAME.SCREENSHOT_WARNING),
SCREENSHOT_LEARN_MORE: generateOpt(EVENT_NAME.SCREENSHOT_LEARN_MORE),
SCREENSHOT_OK: generateOpt(EVENT_NAME.SCREENSHOT_OK),
SRP_REVEAL_QUIZ_PROMPT_SEEN: generateOpt(
EVENT_NAME.SRP_REVEAL_QUIZ_PROMPT_SEEN,
),
SRP_REVEAL_START_CTA_SELECTED: generateOpt(
EVENT_NAME.SRP_REVEAL_START_CTA_SELECTED,
),
SRP_REVEAL_FIRST_QUESTION_SEEN: generateOpt(
EVENT_NAME.SRP_REVEAL_FIRST_QUESTION_SEEN,
),
SRP_REVEAL_FIRST_QUESTION_WRONG_ANSWER: generateOpt(
EVENT_NAME.SRP_REVEAL_FIRST_QUESTION_WRONG_ANSWER,
),
SRP_REVEAL_FIRST_QUESTION_RIGHT_ASNWER: generateOpt(
EVENT_NAME.SRP_REVEAL_FIRST_QUESTION_RIGHT_ASNWER,
),
SRP_REVEAL_SECOND_QUESTION_SEEN: generateOpt(
EVENT_NAME.SRP_REVEAL_SECOND_QUESTION_SEEN,
),
SRP_REVEAL_SECOND_QUESTION_WRONG_ANSWER: generateOpt(
EVENT_NAME.SRP_REVEAL_SECOND_QUESTION_WRONG_ANSWER,
),
SRP_REVEAL_SECOND_QUESTION_RIGHT_ASNWER: generateOpt(
EVENT_NAME.SRP_REVEAL_SECOND_QUESTION_RIGHT_ASNWER,
),
REVEAL_SRP: generateOpt(EVENT_NAME.REVEAL_SRP),
SRP_COPIED: generateOpt(EVENT_NAME.SRP_COPIED),
};

/**
Expand Down