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:
@@ -34,12 +34,24 @@ public class ShareTrackerTests
|
||||
protected override void NavigateToCore(string uri, bool forceLoad) { }
|
||||
}
|
||||
|
||||
// Fixed-value anon-id provider so the tracker can attach a token without JS interop. Treated as
|
||||
// already warmed (Current returns the value); EnsureLoadedAsync is a no-op here.
|
||||
private sealed class StubAnonIdProvider : IAnonIdProvider
|
||||
{
|
||||
public StubAnonIdProvider(string? current) => Current = current;
|
||||
public string? Current { get; }
|
||||
public ValueTask EnsureLoadedAsync() => ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
private ShareTracker _tracker = null!;
|
||||
private readonly DateTimeOffset _t0 = new(2026, 6, 19, 12, 0, 0, TimeSpan.Zero);
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
=> _tracker = new ShareTracker(new BeaconInterop(new NoopJsRuntime()), new TestNavigationManager());
|
||||
=> _tracker = new ShareTracker(
|
||||
new BeaconInterop(new NoopJsRuntime()),
|
||||
new StubAnonIdProvider("anon-1"),
|
||||
new TestNavigationManager());
|
||||
|
||||
// A copy-link records one share with channel = link.
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user