Skip to content

[feat] Enable Google Analytics 4 for flutter.ph - #12

Merged
joshuadeguzman merged 3 commits into
mainfrom
feat/analytics-ga4
Nov 20, 2026
Merged

joshuadeguzman merged 3 commits into
mainfrom
feat/analytics-ga4

Conversation

@joshuadeguzman

Copy link
Copy Markdown
Member

What's in this PR

  • Turns on Google Analytics 4 with measurement ID G-YF5SJSL54Q (property "Flutter Philippines - GA4", web stream for https://flutter.ph). It is the GA4 property in the same Analytics account as the old Universal Analytics tag UA-121652877-4, which Google stopped processing in 2023.
  • The ID lives in src/lib/site.ts (it is public by design). The GA_MEASUREMENT_ID repository variable can still override it.
  • Never loads in local development. Ad storage and personalization are denied by default; analytics storage is granted.

Test Plan

  • pnpm lint, pnpm typecheck, pnpm test (19 passed)
  • pnpm build: the GA4 tag is in out/index.html with G-YF5SJSL54Q
  • After deploy: Realtime in Google Analytics shows a visit to flutter.ph

Please attach screenshots or videos demonstrating the changes:

  • N/A, no visible UI change

Checklist

  • Link any relevant issues (e.g. Sentry).
  • Create unit tests where applicable.
  • Manually verify that this code change works as advertised.
  • Verify all required analytics events were added.
  • Add relevant documentation and/or update relevant documentation.

@joshuadeguzman
joshuadeguzman merged commit 18122b1 into main Nov 20, 2026
1 check passed
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