Skip to content

fix: Harden production analytics behavior - #5

Merged
WillieCubed merged 1 commit into
mainfrom
codex/analytics-corrections
Sep 19, 2026
Merged

WillieCubed merged 1 commit into
mainfrom
codex/analytics-corrections

Conversation

@WillieCubed

Copy link
Copy Markdown
Contributor

TL;DR

Hardens the first public analytics package before 0.1.0 is published. Private routes no longer disable valid pageviews elsewhere in an SPA, clean browsers without sendBeacon use the documented fetch fallback, and production verification distinguishes Cloudflare's script, RUM requests, and LVBT collector traffic.

Overview of Changes

The client filters pageviews per route while preserving automatic SPA tracking on allowed paths. It also restores patched browser APIs during tests and handles environments where navigator.sendBeacon is absent.

The verification command now checks the configured site and separates script loading, Cloudflare RUM, and collector events. Weekly coverage includes every configured production property. The package tarball includes the repository's MIT license.

pnpm check passes with 49 package unit tests, 15 collector tests, 2 report tests, 3 Playwright tests, package validation, size checks, and Wrangler dry runs.

Follow-ups

Publish @lvbt/analytics@0.1.0 after this review merges, then replace the verified local tarball in Labs, the main website, and TransitMapper with the registry release.

Preserve allowed pageviews while filtering private routes.
Verify deployed analytics surfaces independently and package the license
with the public client.

Co-authored-by: Codex <noreply@openai.com>
@WillieCubed
WillieCubed merged commit 791bffe into main Sep 19, 2026
1 check passed
@WillieCubed
WillieCubed deleted the codex/analytics-corrections branch September 19, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant