Repository navigation
fix(analytics): one explicit GA4 page_view per route (send_page_view:false) - #893
Merged
Merged
Conversation
This was referenced Oct 30, 2026
… page_title after route title update
unjica
pushed a commit
that referenced
this pull request
Oct 30, 2026
This was referenced Oct 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Base branch:
developSummary
Fixes P0 from the Phase 1 analytics audit (telemetry-tracker.com): client-side navigations sent no
page_view, and the next one carried the previous URL (dl=/docs,dp=/).GoogleAnalytics.tsxnow callsgtag('config', id, { send_page_view: false })once, and after each route commit sends exactly onegtag('event', 'page_view', { page_location, page_path, page_title })with the current values (deferred one task so URL and<title>are committed). Deduped by path; reset when tracking stops (reject / dashboard routes) so a later accept or return counts once.buildGaPageViewParamsinlib/google-analytics.ts.How to test
pnpm lint✅,pnpm --filter dashboard test✅ (73 files / 445 tests incl. newGoogleAnalytics.test.tsx),next build✅.http://localhost:3401, GA/collectintercepted locally, nothing sent to Google): landing 1page_view(/, correct title); Link nav → 1page_viewdl=/docs dp=/docs dt="Documentation · Telemetry Tracker".page_viewwith staledl=/docsand nodpappears next to ours. This is GA4 Enhanced measurement "Page changes based on browser history events" (stream setting, same as Tacko P0). Turn it off in GA4 Admin → Data streams → telemetry-tracker.com → Enhanced measurement → Page views → Advanced.Code review (Bugbot)
Checklist
[Unreleased]Security / privacy
No change to consent gating: GA still loads only after Accept and only on marketing/docs routes.