Files
orca/docs
Jinjing 81730c0b3d Track usage of closing tabs to left and right (#30557)
* Add telemetry for directional tab close requests

Measure how often people use Close Tabs To The Left and Right, without recording tab titles, paths, or workspace identifiers.

- Sample a stable 10% of installs by hashing the install ID, so membership survives restarts. The app-open event carries the sampled flag so the group can be analysed.
- Cap each direction to one event per app session, tracked in main, so repeated clicks or extra windows cannot inflate volume.
- Count the request before the close flow runs, so cancelled save prompts still count.
- Route both directions through one helper that counts eligible unpinned tabs in visible order.

* Count settings opt-in sessions in tab-close sampling denominator

Enabling telemetry from settings now fires `app_opened` for that session, not only when the opt-in came from the pending banner. Before, settings opt-ins never emitted `app_opened`, so those sessions were missing from the adoption denominator for directional tab close events.

- `trackAppOpenedOnce` now marks the session as tracked only when `track()` accepts the event. An opt-out or environment consent override no longer uses up the session's denominator.
- Tests cover sampling for settings opt-in and the `DO_NOT_TRACK` override.
2026-10-18 21:29:29 -07:00
..