Files
Stephan D f1cbf64282 Fix onboarding UX and add replaceable journey analytics
Make recipient changes explicit, prioritize verification retry, and label simulated outcomes prominently. Add shared typed analytics with bounded dummy capture, correlated service events and documented PostHog adapter contract. Validate privacy, retries, abandonment, keyboard recovery and accessibility. Related to #12.
2026-09-12 08:36:45 +02:00

22 lines
930 B
Markdown

# SXCHNGE analytics
Shared pure-Dart analytics contract, semantic journey recorder and bounded
in-memory dummy service. No PostHog SDK, network, persistence or logging.
```dart
final analytics = DummyAnalyticsService();
final recorder = JourneyRecorder(analytics);
final operation = recorder.begin(JourneyKind.login, JourneyStep.login);
recorder.finish(operation, simulated: true, terminal: true);
final captured = analytics.events; // immutable snapshot
recorder.dispose();
```
Inject an `AnalyticsService` implementation to replace the sink. Consumers do not
await analytics. See [the auth journey contract](../../../docs/ux/auth-journeys.md)
for schema, metric definitions, simulation rules, privacy, retry/abandonment
semantics, PostHog adapter guidance and measurement limitations.
Run `flutter test` and `flutter analyze` here. The production library imports
only Dart SDK libraries and can be reused by web and mobile.