Skip to content

Add simplified sync pixels - #9401

Open
MiSikora wants to merge 2 commits into
developfrom
feature/mehow/simple-sync/pixels
Open

Add simplified sync pixels#9401
MiSikora wants to merge 2 commits into
developfrom
feature/mehow/simple-sync/pixels

Conversation

@MiSikora

@MiSikora MiSikora commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Task/Issue URL: https://app.asana.com/1/137249556945/project/1216103556496795/task/1216422585541219?focus=true
Tech Design URL (if applicable): N/A
API Proposals URL(s) (if applicable): N/A

Description

Brings the simplified Sync (v2) setup flow to pixel parity with the legacy setup flow and with iOS, adds a set of new Sync settings pixels, and tags sync setup pixels with a ui_version parameter so each pixel records whether it came from the simplified or the legacy UI. It also changes one setup behavior so restoring a previous session reuses the current device (this is the legacy behavior).

New Sync settings pixels:

  • Opening the Sync settings screen fires m_settings_sync_open.
  • Tapping "Sync This Device" fires m_settings_sync_back_up_this_device_tapped.
  • Starting the recover synced data flow fires m_settings_sync_recover_synced_data_tapped.
  • Confirming recovery on the "Recover your synced data" screen fires m_settings_sync_recovery_confirmed_tapped.
  • The prompt that asks whether to sync this device or another device fires m_settings_sync_another_device_prompt_shown when it appears.
  • Choosing an option on that prompt fires m_settings_sync_another_device_prompt_option_tapped, with an option of this_device_only or sync_another_device.

Simplified Sync setup parity:

  • The simplified scan and manual entry screens now fire the setup pixels that previously only fired in the legacy flow, including the scan QR screen shown (sync_setup_scan_qr_screen_shown), the barcode and manual code screens shown, code recognized success and failure, setup finished, setup failed, and setup abandoned.
  • The deep link setup path now fires its started, success, and abandoned pixels from the simplified flow.
  • Account switching now fires its ask to switch, accepted, cancelled, and switched pixels from the simplified flow.
  • Restoring a previous session now fires the auto restore success and failure pixels.
  • A sync_login pixel is fired on every successful setup.

ui_version parameter:

  • Sync setup, login, signup, error, account switching, and auto restore pixels now include a ui_version parameter, set to v2 when the simplified sync UI is enabled (useSimplifiedSync) and v1 otherwise.
  • The sync-setup wide event carries the same ui_version value in its metadata.

Behavior change:

  • When restoring a previous session from Sync settings, the stored recovery payload's device id is now passed through when the code is processed, so the restore reuses the existing device record instead of registering a new device.

Note

I added only some basic tests that verify the ui_version parameter. I'll expand them in a followup PR after adding TestParameterInjector.

Steps to test this PR

I think there are too many pixels to write a comprehensive testing scenario. I documented Pixels for the simplified UI in this task. I tested it in the following way:

  1. Set up Device A with the useSimplifiedSync feature flag enabled.
  2. Set up Device B with the useSimplifiedSync feature flag disabled.
  3. Split the terminal into 2 pans and run adb -s <DEVICE_ID> logcat -s RxBasedPixel:V in each pane.
  4. Have a Device C that you'll be able to use to show QR codes, etc.
  5. Run the same user journeys using both devices and compare logged pixels.

UI changes

N/A


Note

Low Risk
Changes are mostly telemetry definitions and pixel firing in sync setup UI; the only functional change is passing a preserved device id on session restore, which aligns with legacy behavior and is localized to sync account processing.

Overview
Adds analytics parity for the simplified Sync setup UI and new Sync settings telemetry, plus a small restore behavior fix.

ui_version on sync pixels: Setup, login, signup, errors, account switching, and auto-restore events now include ui_version (v1 / v2 from useSimplifiedSync). The sync-setup wide event adds the same field in metadata.

New settings pixels: Definitions and firing for opening Sync settings, backup-this-device, recover-data taps/confirmations, and the “this device vs another device” prompt (shown + option tapped).

Simplified flow pixel wiring: v2 screens and ProcessSyncCodeViewModel now emit the setup pixels that legacy already had (scan QR shown, parse success/failure, finished/failed/abandoned, deep link lifecycle, account switch, auto-restore success/failure, sync_login). SyncCodeSource replaces raw code strings in contracts so scan/paste/deep link/restored paths are distinguished for pixels and restore logic.

Restore behavior: Restoring a previous session passes the preserved device id from auto-restore payload into processCode so the existing device record is reused.

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

Comment thread sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/SyncActivityViewModel.kt Outdated
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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

@MiSikora
MiSikora changed the base branch from feature/msikora/simple-sync/pixels-cleanup to graphite-base/9401 August 5, 2026 15:26
@MiSikora
MiSikora force-pushed the graphite-base/9401 branch from b109e98 to b83ea32 Compare August 5, 2026 15:41
@MiSikora
MiSikora force-pushed the feature/mehow/simple-sync/pixels branch from f70f693 to 872f15a Compare August 5, 2026 15:41
@graphite-app
graphite-app Bot changed the base branch from graphite-base/9401 to develop August 5, 2026 15:41
@MiSikora
MiSikora force-pushed the feature/mehow/simple-sync/pixels branch from 872f15a to 7a959b3 Compare August 5, 2026 15:42
@MiSikora
MiSikora force-pushed the feature/mehow/simple-sync/pixels branch from 7a959b3 to f8b12f6 Compare August 5, 2026 16:16

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f8b12f6. Configure here.

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