Skip to content

Add optional Google Analytics integration - #18

Merged
walishcs merged 2 commits into
mainfrom
codex/google-analytics-integration
Aug 13, 2026
Merged

Add optional Google Analytics integration#18
walishcs merged 2 commits into
mainfrom
codex/google-analytics-integration

Conversation

@walishcs

Copy link
Copy Markdown
Owner

Summary

  • add an optional GA4 measurement ID to Keystatic Site settings
  • link to Google’s official instructions for finding the tag ID
  • load the Google tag only in production and rely on GA4 history-change measurement for Astro page transitions
  • keep empty or invalid IDs from injecting analytics
  • document the production-only analytics rule in AGENTS.md

Impact

Editors can configure a public GA4 measurement ID locally through Keystatic and publish it with site content. Local development does not send analytics data. Existing Site settings files remain valid when the new field is absent.

Validation

  • npm run check
  • npm test (43 tests)
  • npm run format:check
  • npm run build
  • npm run astryx -- doctor
  • Keystatic UI verification for the field and official help link

@walishcs
walishcs merged commit b70cef7 into main Aug 13, 2026
1 check passed
@walishcs
walishcs deleted the codex/google-analytics-integration branch August 13, 2026 09:08
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