Storybooks for commit 947ae85c25fe81edf8a91953a9a07d3ec9620b2e

Date
9/23/2026, 5:41:10 PM UTC
Summary
feat: add Glean metrics to the pair2 pairing flows
Description
Because:

* The pair2 screens ship with no metrics, so the pairing funnel is invisible on
  both devices and on the server.
* Nothing reported whether a QR scan reached Firefox, fell back to the app
  store, or was swallowed by an embedded WebView.
* Glean's automatic events report window.location.href, so the pairing channel
  key in the URL fragment was being sent to telemetry.

This commit:

* Adds data-glean-id to every action on the 12 Pair2 pages, plus
  dtm_desktop/dtm_mobile view events carrying the interrupted-screen state that
  the automatic view event cannot split.
* Adds four dtm_mobile deeplink events, wired into PocPairInit, flushing pings
  before the navigations that abandon the page.
* Adds dtm_backend.pair_success on /oauth/authorization, which pair2 only
  reaches once both devices have confirmed, detected by a positive test for
  desktop Firefox so an iPad sign-in is not counted as a pairing.
* Captures the pairing fragment at startup and removes it from the URL, keeping
  the channel key out of telemetry while surviving the post-OAuth reload.
* Adds session.pairing_channel_hash, sent in both the accounts-events and events
  pings so it rides on the automatic page-load and click events too.
* Derives it in initMetrics from a SHA-256 of the channel id, reusing the digest
  helper the uid hash already used.
* Resolves the channel id once at page load, from the query param on the
  authority and the captured fragment on the supplicant, rather than reading the
  URL live, which would repeat the FXA-14093 flow-id mismatch.

  feat(settings): join pair2 metrics across devices with a hashed channel id