Skip to content

[AAASM-3552] 📈 (docs): Wire GA4 analytics into the mkdocs site#167

Merged
Chisanan232 merged 2 commits into
masterfrom
v0.0.1/AAASM-3552/mkdocs_ga4
Jun 22, 2026
Merged

[AAASM-3552] 📈 (docs): Wire GA4 analytics into the mkdocs site#167
Chisanan232 merged 2 commits into
masterfrom
v0.0.1/AAASM-3552/mkdocs_ga4

Conversation

@Chisanan232

Copy link
Copy Markdown
Contributor

Description

Wires Google Analytics 4 into the Python SDK mkdocs-material docs site using Material's native analytics integration, plus the native GDPR cookie-consent so analytics cookies are gated behind explicit opt-in.

  • Adds extra.analytics (provider google, Measurement ID G-L8JTJDG8G7) under the existing extra: block. The Measurement ID is a public client-side identifier embedded in the rendered HTML — it is not a secret.
  • Adds extra.consent (Cookie consent banner with accept / reject / manage actions and an analytics cookie group, checked: false by default).

Type of Change

  • ✨ New feature
  • 🔧 Bug fix
  • ♻️ Refactoring
  • 🍀 Performance improvement
  • 📚 Documentation update
  • 🚀 Release

Breaking Changes

Does this PR introduce any breaking changes?

  • No
  • Yes (please describe below)

Related Issues

  • Related JIRA ticket: AAASM-3552
  • Related GitHub issues: #XX

Testing

Describe the testing performed for this PR:

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No tests required (explain why)

uv run --group docs mkdocs build --strict builds clean (only the pre-existing release/RUNBOOK.md not-in-nav INFO). The gtag id G-L8JTJDG8G7 is confirmed present in the built site/ HTML.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex logic
  • Documentation updated if needed
  • All tests passing

Chisanan232 and others added 2 commits June 22, 2026 22:08
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Chisanan232

Copy link
Copy Markdown
Contributor Author

Claude Code — review result

CI green — Analyze (python), CodeQL, Build documentation all pass. No fails to ignore.

Scope vs AAASM-3552 (python-sdk site) — covered. Wires GA4 G-L8JTJDG8G7 via mkdocs-material's native extra.analytics (provider google), plus the native extra.consent cookie banner (accept/reject/manage; analytics cookie checked: false). Two small commits. Verified mkdocs build --strict is clean and the gtag id is emitted across all built pages. The Measurement ID is public (correctly committed, not a secret); anonymize_ip semantics handled by mkdocs-material.

Ready for approval + merge. This site is the most complete of the five — it has the native consent UI built in.

@Chisanan232 Chisanan232 merged commit 375692c into master Jun 22, 2026
6 checks passed
@Chisanan232 Chisanan232 deleted the v0.0.1/AAASM-3552/mkdocs_ga4 branch June 22, 2026 14:21
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