You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applications in frontend/ have no shared browser analytics integration. Legacy Studio pages report directly from the browser through apps/src/metrics/AnalyticsReporter and StatsigReporter, but Next Generation Frontend Platform applications cannot preserve those events without importing the legacy apps/ bundle.
Do not add a Rails event-proxy endpoint. The browser should continue to report analytics directly to the configured provider.
Scope
Add a supported analytics integration for applications built on @code-dot-org/core.
Start with a core plugin, following the default rule in frontend/packages/core/README.md. Use a separate package only if the provider SDK weight or lifecycle requirements justify that boundary.
The integration must:
expose a small, typed, provider-independent event API to frontend/ packages;
initialize during initializeCore and be opt-in at each application entrypoint;
configure Statsig for the Studio application;
preserve the existing consent rules and stable-ID behavior;
update analytics identity when authentication state changes;
support environment-specific configuration and a no-op provider for tests or disabled environments;
buffer or safely discard events emitted before asynchronous provider initialization completes;
Background
Applications in
frontend/have no shared browser analytics integration. Legacy Studio pages report directly from the browser throughapps/src/metrics/AnalyticsReporterandStatsigReporter, but Next Generation Frontend Platform applications cannot preserve those events without importing the legacyapps/bundle.This blocks analytics parity for:
Do not add a Rails event-proxy endpoint. The browser should continue to report analytics directly to the configured provider.
Scope
Add a supported analytics integration for applications built on
@code-dot-org/core.Start with a core plugin, following the default rule in
frontend/packages/core/README.md. Use a separate package only if the provider SDK weight or lifecycle requirements justify that boundary.The integration must:
frontend/packages;initializeCoreand be opt-in at each application entrypoint;The initial consumers are Account Settings and Certificates. Migrating unrelated legacy analytics callers is out of scope.
Acceptance criteria
frontend/feature package can log a typed event without importing fromapps/or calling Rails.References
frontend/packages/core/README.md, especially “Plugin vs. new package”frontend/packages/core/src/plugins/observability/for the existing adapter and lifecycle patternapps/src/metrics/AnalyticsReporter.jsapps/src/metrics/StatsigReporter.js