Skip to content

Add metrics for the passwords import onboarding experiment - #9743

Open
catalinradoiu wants to merge 2 commits into
refactor/cradoiu/move-passwords-import-pixelsfrom
feature/cradoiu/define-metrics-for-passwords-import-experiment
Open

Add metrics for the passwords import onboarding experiment#9743
catalinradoiu wants to merge 2 commits into
refactor/cradoiu/move-passwords-import-pixelsfrom
feature/cradoiu/define-metrics-for-passwords-import-experiment

Conversation

@catalinradoiu

@catalinradoiu catalinradoiu commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1217594019546143?focus=true
Tech Design URL (if applicable):
API Proposals URL(s) (if applicable): None

Description

Adds the experiment metrics for onboarding passwords import experiment.

Metric Conversion windows
onboarding_completed d0, d0-14
password_import_started d0, d0-14
password_import_success d0, d0-14
password_import_failed d0, d0-14
password_import_cancelled d0, d0-14

Steps to test this PR

The wire pixels are experiment_enroll_passwordImportExperimentAug25_<cohort> and experiment_metrics_passwordImportExperimentAug25_<cohort>, the latter carrying the metric in a metric= param.

logs

  • Filter logcat by message~:"passwordImportExperimentAug25".

setup

  • Apply the below diff, so the experiment is in the bundled config.
diff --git a/privacy-config/privacy-config-impl/src/main/res/raw/privacy_config.json b/privacy-config/privacy-config-impl/src/main/res/raw/privacy_config.json
--- a/privacy-config/privacy-config-impl/src/main/res/raw/privacy_config.json
+++ b/privacy-config/privacy-config-impl/src/main/res/raw/privacy_config.json
@@ -973,6 +973,24 @@
                     ]
                 }
             }
+        },
+        "onboardingPasswordImport": {
+            "state": "enabled",
+            "features": {
+                "passwordImportExperimentAug25": {
+                    "state": "enabled",
+                    "cohorts": [
+                        {
+                            "name": "control",
+                            "weight": 1
+                        },
+                        {
+                            "name": "treatment",
+                            "weight": 0
+                        }
+                    ]
+                }
+            }
         }
     },
     "unprotectedTemporary": []

no experiment

  • Revert the two changes above (or set both sub-feature states to disabled).
  • Delete the DuckDuckGo folder from the device's Downloads
  • Clean install.
  • Verify onboarding launches with no password import step.
  • Verify no passwordImportExperimentAug25 pixels fire at all — no enrollment and no metrics.
  • Import passwords from Settings → Passwords → Import from Google, and verify still no metric pixels fire.

control

  • Restore the setup above, with control weight 1 and treatment weight 0 in both files.
  • Delete the DuckDuckGo folder from the device's Downloads.
  • Clean install.
  • Verify experiment_enroll_passwordImportExperimentAug25_control fires.
  • Verify onboarding runs without a password import step.
  • Walk the onboarding to the end and verify metric=onboarding_completed.
  • Go to Settings → Passwords → Import from Google and start the flow. Verify metric=password_import_started.
  • Complete the import and verify metric=password_import_success.
  • Clear app data, repeat up to the import screen, then close it with the X or the back button. Verify metric=password_import_cancelled.

treatment

  • Set control weight to 0 and treatment weight to 1 in both privacy_config.json then rebuild.
  • Delete the DuckDuckGo folder from the device's Downloads.
  • Clean install.
  • Verify experiment_enroll_passwordImportExperimentAug25_treatment fires.
  • Verify the password import step does appear in onboarding.
  • Tap Import and verify metric=password_import_started.
  • Complete the import and verify metric=password_import_success, and that the outcome card shows the imported/skipped counts.
  • Walk the onboarding to the end and verify metric=onboarding_completed.
  • Clear app data and repeat, this time closing the Google import screen with the X. Verify metric=password_import_cancelled and that you land back on the import card.
  • Clear app data and repeat, this time tapping Skip on the import card. Verify the flow advances past the import steps and no password_import_started fires.

reinstaller

  • Keep the config from the treatment run, and do not delete the DuckDuckGo folder from Downloads.
  • Clean install.
  • Verify onboarding launches with no password import step (reinstallers are excluded from enrollment).
  • Verify no passwordImportExperimentAug25 enrollment or metric pixels fire.

UI changes

Before After
No UI changes No UI changes

Note

Low Risk
Analytics-only changes on existing onboarding and import flows; no user-facing behavior or credential handling logic changes.

Overview
Adds native experiment instrumentation for passwordImportExperimentAug25, wiring five conversion metrics (d0 and d0–14) for onboarding completion and Google password import funnel events.

Registers the experiment and metric definitions in native_experiments.json5. When the user reaches ESTABLISHED, OnboardingCompletedMetricObserver now also fires onboarding_completed via OnboardingPasswordImportExperimentMetrics (alongside the existing prompts experiment).

In autofill, new PasswordImportExperimentMetrics sends password_import_started, password_import_success, password_import_failed, and password_import_cancelled from the Google import web flow and from ImportPasswordsResultPixelObserver on successful import completion. The autofill module resolves the experiment toggle by name through FeatureTogglesInventory to avoid a dependency on the onboarding feature module.

Unit tests cover metric payloads, observer wiring, and view-model trigger points.

Reviewed by Cursor Bugbot for commit 3e3519e. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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

@LukasPaczos LukasPaczos self-assigned this Sep 8, 2026

@LukasPaczos LukasPaczos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

catalinradoiu and others added 2 commits September 10, 2026 09:54
Adds the onboarding completion metric for passwordImportExperimentAug25,
fired when the user reaches the established stage, plus the import started,
success, failed and cancelled metrics.

The import metrics fire from the root of the import flow — the web flow view
model and the app-scoped import result observer — rather than from each
caller, so imports are counted for both cohorts and from every entry point.
The experiment lives in the onboarding feature, which autofill-impl cannot
depend on, so the toggle is resolved through the feature toggles inventory
by name.

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

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Registers passwordImportExperimentAug25 and its five metrics under
activeExperiments, so the pixels sent by the native experiments
framework are documented.

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

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@catalinradoiu
catalinradoiu force-pushed the feature/cradoiu/define-metrics-for-passwords-import-experiment branch from c8ffbae to 3e3519e Compare September 10, 2026 06:54
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