Add the search metrics for the quick setup onboarding experiment according to the experiment design#8658
Open
catalinradoiu wants to merge 2 commits into
Open
Conversation
…rding to the experiment design
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Move the search-count pixels for the quick-setup onboarding experiment out of feature-toggles-impl into the app module, alongside the OnboardingQuickSetupToggles feature flag. The plugin now injects the toggle directly instead of looking it up by name in the inventory, so removing the flag at experiment end will surface this code as a compile-time usage to clean up. The metrics are now only emitted when the experiment toggle is enabled and the user is enrolled. Adds value=6 to the daily-windowed counts (was missing from the 2..10 sequence). Task/Issue URL: https://app.asana.com/1/137249556945/project/1211724162604201/task/1214753739886022 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Task/Issue URL: https://app.asana.com/1/137249556945/project/1211724162604201/task/1214753739886022
Description
Adds the search-count metrics for the quick-setup onboarding experiment (
onboardingQuickSetupExperimentMay26).The plugin lives alongside the experiment's feature flag in
com.duckduckgo.app.onboardingquicksetupand is wired as anAtbLifecyclePluginthat fires ononSearchRetentionAtbRefreshed. It injectsOnboardingQuickSetupTogglesdirectly (not via inventory-by-name) so removing the flag at experiment end will surface this code as a compile-time usage to clean up.Metrics emitted per search-refresh ATB:
searchvalue1on a singleD1..D3conversion window (mirrors the experiment's "first search" milestone).searchvalues2..10on dailyD0..D7conversion windows.Both gates are required: the experiment toggle must be
isEnabled()andisEnrolled()— otherwise no metrics are emitted.Steps to test this PR
Quick-setup search metrics
onboardingQuickSetupExperimentMay26toggle is disabled or the user is not enrolled, refresh the search retention ATB and confirm nosearch_*experiment pixels are sent for this toggle.searchpixels are emitted with values1..10and the documented conversion windows.OnboardingQuickSetupSearchMetricsAtbLifecyclePluginTestpass (./gradlew :app:testPlayDebugUnitTest --tests "com.duckduckgo.app.onboardingquicksetup.OnboardingQuickSetupSearchMetricsAtbLifecyclePluginTest").UI changes
Note
Medium Risk
Adds a new
AtbLifecyclePluginthat emits multiple experiment metrics on each search-retention ATB refresh; while gated by enrollment/enabled state, it changes analytics/pixel behavior and could increase event volume if misconfigured.Overview
Adds a new
OnboardingQuickSetupSearchMetricsAtbLifecyclePluginwired via multibinding to send experimentsearchmetrics whenonSearchRetentionAtbRefreshedfires, but only whenonboardingQuickSetupExperimentMay26is both enabled and the user is enrolled.When active, it emits
COUNT_WHEN_IN_WINDOWpixels forsearchvalues1..10, using a singleD1..D3window for value1and dailyD0..D7conversion windows for values2..10. Includes unit tests validating gating, metric contents, and that no pixels are sent for other ATB refresh callbacks.Reviewed by Cursor Bugbot for commit 3b44237. Bugbot is set up for automated code reviews on this repo. Configure here.