fix(analytics,static): GA pageviews never sent; public assets 404 via intl rewrite - #332
Merged
Conversation
… intl rewrite
- SPA pageviews used gtag('config', page_path) after send_page_view:false,
which does not reliably emit a page_view — switch to the documented
gtag('event', 'page_view') pattern; drop the UA-era sample_rate (absent
from the GA4 config reference).
- favicons lived in app/favicons (never served); move to public/favicons.
- Static requests reached next-intl and were rewritten into /[locale]/,
404ing every nested public asset (favicons, images/**): proxy now passes
file-like paths through before intl; /@-rooted account paths unaffected.
ety001
force-pushed
the
fix/ga-pageview-and-favicons
branch
from
September 3, 2026 18:49
dc81bc7 to
a267609
Compare
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.
Summary
Three fixes found while verifying the test-env deployment of #331 (GA id present in HTML but zero data in GA; favicon 404s on wallet.steemitdev.com):
1. GA pageviews were never sent
The init config sets
send_page_view: false(so our SPA pageview component is the single source of pageviews), but the component re-issuedgtag('config', …, {page_path})— per Google's Measure pageviews docs that does not reliably emit a page_view once the default is disabled. Result: zero pageviews reported. Switched to the documentedgtag('event', 'page_view', {page_path, page_title, send_to}).2. UA-era
sample_rate: 5droppedAbsent from the GA4 config reference — dead code for G- measurement ids.
3. Every nested
public/asset 404'd in production (not just favicons)app/favicons/— Next.js only servespublic/(moved; URLs unchanged)./[locale]/…→ 404. This brokepublic/images/**(about-page images) too, since the rewrite shipped. The proxy now passes file-like paths (last-segment static extension) straight through;/@…-rooted account URLs are exempt so account names with dots/extensions keep routing.Verification
/favicons/*200,/images/about/mission.jpg200,/market200 with nonce'd gtag, csrf cookie issued, no sample_rate