Skip to content

Conversation

@sevoku
Copy link
Member

@sevoku sevoku commented Apr 4, 2025

This pull request focuses on improving the survey initialization and telemetry:

  • update A/B test selection probability to 50%
  • Add more focused telemetry to initSurvey (survey.init event)
    • isCandidate: whether qualified or not
    • reason: string describing the decision step to disqualify as a candidate
      • 02_prompt_version_only_once:
        • skipVersion: opt-out version
      • 03_survey_taken_recently
        • surveyTakenDate: date when the survey was taken
        • daysSinceTaken: days since the survey was taken
      • 04_opted_out_recently
        • optOutDate: date when user opted out
      • 05_prompted_today
        • lastSessionDate: date of the last session
      • 06_insufficient_sessions
        • sessionCount: current session count
      • 07_not_in_ab_test_group
        • acceptedForABTest: whether machine has been selected
        • normalizedValue: normalized score
      • 08_random
        • usedFallbackSelection: whether A/B scoring failed previously
  • add telemetry tracking to promptAfterActionEventually with a new survey.measure-score event
    • Properties:
      • triggerAction: the action that triggered the prompt
      • triggerActionScore: the score increase contributed by the action
      • experience: the experience
      • experienceScore: the current experience score
      • fullScore: the current experience score
      • isSurveyDisabledGlobally
      • wasPromptedInSession
      • scoreTargetReached: whether the score target was reached
      • isCandidate: whether qualified or not

Improvements to A/B Test Selection:

  • src/utils/survey.ts: Updated the A_B_TEST_SELECTION value from 0.25 to 0.5 for consistent testing.

Enhancements to Telemetry Logging:

  • src/utils/survey.ts: Added detailed telemetry properties in the promptAfterActionEventually function to log various survey-related metrics.

Refactoring Candidate Status Logic:

  • src/utils/survey.ts: Introduced the setCandidateStatus helper function to streamline setting the candidate status and logging telemetry properties. This function is used in multiple places to simplify the code and ensure consistency. [1] [2] [3] [4] [5] [6] [7]

Consistent Testing:

@sevoku sevoku force-pushed the dev/sevoku/hats-fixes branch from fc102ee to 54c251e Compare April 4, 2025 14:55
@sevoku sevoku requested a review from Copilot April 4, 2025 14:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/utils/survey.ts:215

  • The configuration object is defined directly on SurveyConfig, yet its properties are accessed via SurveyConfig.settings. Ensure a consistent object structure to avoid potential runtime errors.
if (SurveyConfig.settings.DEBUG_ALWAYS_PROMPT) {

@tnaum-ms
Copy link
Collaborator

tnaum-ms commented Apr 7, 2025

@sevoku I should have checked current PRs :-D

af83ef4

@tnaum-ms
Copy link
Collaborator

tnaum-ms commented Apr 7, 2025

@sevoku I should have checked current PRs :-D

af83ef4

Please add a "number prefix" to rejection reasons, similar to the file linked. This should make it easier to generate a sorted funnel-chart.

@sevoku sevoku marked this pull request as ready for review April 7, 2025 10:06
@sevoku sevoku requested a review from a team as a code owner April 7, 2025 10:06
@sevoku sevoku changed the title Dev/sevoku/hats fixes fix(survey): improve feedback survey initialisation and telemetry Apr 7, 2025
@sevoku sevoku merged commit 5860860 into main Apr 7, 2025
2 checks passed
@sevoku sevoku deleted the dev/sevoku/hats-fixes branch April 7, 2025 11:42
sevoku added a commit that referenced this pull request Apr 7, 2025
)

* update A/B test selection probability to 50%
* add more focused telemetry to initSurvey (survey.init event)
* add telemetry to promptAfterActionEventually

(cherry picked from commit 5860860)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants