Skip to content

Add temporary pixel to track default browser page shown during onboarding#7784

Merged
mikescamell merged 5 commits intodevelopfrom
feature/mike/add-onboarding-default-browser-page
Feb 25, 2026
Merged

Add temporary pixel to track default browser page shown during onboarding#7784
mikescamell merged 5 commits intodevelopfrom
feature/mike/add-onboarding-default-browser-page

Conversation

@mikescamell
Copy link
Copy Markdown
Contributor

@mikescamell mikescamell commented Feb 20, 2026

Task/Issue URL: https://app.asana.com/1/137249556945/project/1207908166761516/task/1213373374735573?focus=true

Description

Adds a temporary pixel to see if anyone is actually seeing the DefaultBrowserPage so we can make a more informed decision as to whether to remove it.

Removal task: https://app.asana.com/1/137249556945/project/1205278999335242/task/1213373374735577?focus=true

Steps to test this PR

Clean install

  • Launch app
  • Get to "Choose Default Browser" screen
  • Click "Choose Your Browser"
  • Do not select a default
  • Close App
  • Launch app
  • Get to "Choose Default Browser" screen
  • Click "Choose Your Browser"
  • Do not select a default
  • Close App
  • Launch app
  • Get to "Choose Default Browser" screen
  • Click "Choose Your Browser"
  • DefaultBrowserPage should show
  • Check logs for m_preonboarding_default_browser_page_shown pixel being fired

UI changes

N/A


Note

Low Risk
Adds a single analytics event and minimal lifecycle hooks in the onboarding UI; primary risk is accidental over/under-counting due to fragment visibility edge cases.

Overview
Adds a new temporary onboarding telemetry pixel (m_preonboarding_default_browser_page_shown_unique) and wires it into DefaultBrowserPage/DefaultBrowserPageViewModel to fire as a unique event when that page becomes visible (handling both onResume and pager visibility via setUserVisibleHint).

Registers the pixel in AppPixelName, documents it in onboarding.json5 (with an expiry), ensures ATB is stripped via PixelParamRemovalInterceptor, and adds unit tests verifying the pixel only fires when onPageShown() is invoked (not on ViewModel init).

Written by Cursor Bugbot for commit cc7bf42. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

Privacy Review task: https://app.asana.com/0/69071770703008/1213376845722909

@mikescamell mikescamell force-pushed the feature/mike/add-onboarding-default-browser-page branch from 5e74a43 to fbf18bd Compare February 20, 2026 14:34
…ad of when visible

The PREONBOARDING_DEFAULT_BROWSER_PAGE_SHOWN pixel was firing in
ViewModel init{}, which runs when the ViewPager pre-loads the fragment
off-screen. Move the pixel to a once-guarded onPageShown() method and
trigger it from setUserVisibleHint/onResume so it only fires when the
user actually sees the page.
@mikescamell mikescamell force-pushed the feature/mike/add-onboarding-default-browser-page branch from fbf18bd to 7e07a79 Compare February 20, 2026 14:38
Copy link
Copy Markdown
Contributor

@lmac012 lmac012 left a comment

Choose a reason for hiding this comment

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

LGTM

@mikescamell mikescamell force-pushed the feature/mike/add-onboarding-default-browser-page branch from f41f2cc to 2dd1976 Compare February 24, 2026 18:41
Comment thread app/src/main/java/com/duckduckgo/app/pixels/AppPixelName.kt Outdated
Only call `onPageShown()` when `DefaultBrowserPage` is actually visible (`userVisibleHint && isResumed && view != null`) by centralizing the logic in `maybeReportPageShown()`. This removes lifecycle state juggling and prevents stale visibility paths from reporting the page as shown.

Now we're using a Unique pixel type we do not need to have code in the ViewModel to stop multiple calls, it will fire once only
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@mikescamell mikescamell merged commit 561b36e into develop Feb 25, 2026
16 checks passed
@mikescamell mikescamell deleted the feature/mike/add-onboarding-default-browser-page branch February 25, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants