feat(phase-16.3): light up anonId unique-listener layer

Mint a first-party localStorage anonId, thread it onto play/share beacons,
persist it via EventController, and add all-time distinct-listener counts
(site/track/release). Storage columns + indexes already existed from 16.1.
This commit is contained in:
daniel-c-harvey
2026-06-19 14:37:55 -04:00
parent ebbaa3f84f
commit c084efa78e
16 changed files with 680 additions and 12 deletions
+4 -1
View File
@@ -38,8 +38,11 @@ public static class Startup
// Phase 16 anonymous telemetry (client side). BeaconInterop wraps sendBeacon; the play sink and
// share tracker fire events through it. The play tracker itself is NOT registered — the player
// is not DI-registered, so AudioPlayerProvider constructs the tracker and attaches it. ShareTracker
// is scoped so its per-(target,channel) debounce memory lives for the session.
// is scoped so its per-(target,channel) debounce memory lives for the session. AnonIdProvider
// (wave 16.3) caches the first-party localStorage listener id; scoped so the cache lives for the
// session, warmed when a surface goes interactive (the player provider, the share popover).
services.AddScoped<BeaconInterop>();
services.AddScoped<IAnonIdProvider, AnonIdProvider>();
services.AddScoped<IPlayEventSink, BeaconPlayEventSink>();
services.AddScoped<ShareTracker>();
}