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
Context. Wave 7 shipped an untyped trackEvent wrapper in src/analytics.ts around window.plausible, and a Web Vitals dashboard v1 at /vitals (src/pages/Vitals.tsx) that already has a per-page filter (selectedPage, lines 39 and 220-226) sourced from src/data/vitalsData.ts. Two gaps: (a) the generic trackEvent wrapper is not typed and is not DNT-aware on its own (DNT-checking currently lives inside useVitals.ts line 60, only for Vitals emissions), so any new caller has to remember to check DNT; (b) v1 has no per-locale filter, no event conversion tiles, and no way to correlate perf to incidents. Wave 9 content decisions need this to graduate from guessing.
Scope.
Small typed event helper src/utils/track.ts: named events with strict TS payloads; wraps the existing trackEvent from src/analytics.ts; lifts the DNT check out of useVitals.ts so it applies to every named event; no-ops when the analytics script is not loaded.
Instrument a documented set of conversion events: cta_click (with source), newsletter_submit, newsletter_confirm, blog_post_read (fires on scroll depth 80%), calculator_share, chain_matrix_sort, outbound_click (grouped by destination category).
Vitals dashboard v2 at /vitals: keeps the existing per-page filter, adds per-locale filter, adds event conversion tiles alongside the existing LCP/INP/CLS charts, and a 30-day incident overlay from the status page (issue i18n scaffolding + Spanish locale baseline #10).
Documentation on /privacy and /security updated to enumerate every event name, payload schema, retention, and the exact endpoint it hits.
No new third-party requests; everything goes to the same first-party analytics endpoint already in use.
Acceptance.
Every documented event fires exactly once per intended user action (Playwright coverage)
DNT header set: zero network requests to the analytics endpoint (Playwright test fails otherwise)
/vitals v2 renders per-page + per-locale filters, event tiles, and the incident overlay
/privacy lists every event name and payload
Build passes
Lighthouse Perf/SEO stay >= 90 on /vitals
Files.src/utils/track.ts (new), src/pages/Vitals.tsx, src/hooks/useVitals.ts, src/pages/Privacy.tsx, src/pages/Security.tsx (see issue #1), instrumented components across src/components/ and src/pages/, e2e/analytics.spec.ts (new).
Tier: L (5-7 days) | Type: feature
Context. Wave 7 shipped an untyped
trackEventwrapper insrc/analytics.tsaroundwindow.plausible, and a Web Vitals dashboard v1 at/vitals(src/pages/Vitals.tsx) that already has a per-page filter (selectedPage, lines 39 and 220-226) sourced fromsrc/data/vitalsData.ts. Two gaps: (a) the generictrackEventwrapper is not typed and is not DNT-aware on its own (DNT-checking currently lives insideuseVitals.tsline 60, only for Vitals emissions), so any new caller has to remember to check DNT; (b) v1 has no per-locale filter, no event conversion tiles, and no way to correlate perf to incidents. Wave 9 content decisions need this to graduate from guessing.Scope.
src/utils/track.ts: named events with strict TS payloads; wraps the existingtrackEventfromsrc/analytics.ts; lifts the DNT check out ofuseVitals.tsso it applies to every named event; no-ops when the analytics script is not loaded.cta_click(with source),newsletter_submit,newsletter_confirm,blog_post_read(fires on scroll depth 80%),calculator_share,chain_matrix_sort,outbound_click(grouped by destination category)./vitals: keeps the existing per-page filter, adds per-locale filter, adds event conversion tiles alongside the existing LCP/INP/CLS charts, and a 30-day incident overlay from the status page (issue i18n scaffolding + Spanish locale baseline #10)./privacyand/securityupdated to enumerate every event name, payload schema, retention, and the exact endpoint it hits.Acceptance.
/vitalsv2 renders per-page + per-locale filters, event tiles, and the incident overlay/privacylists every event name and payload/vitalsFiles.
src/utils/track.ts(new),src/pages/Vitals.tsx,src/hooks/useVitals.ts,src/pages/Privacy.tsx,src/pages/Security.tsx(see issue #1), instrumented components acrosssrc/components/andsrc/pages/,e2e/analytics.spec.ts(new).