Skip to content

feat: add Google Analytics 4 (GA4) integration#77

Merged
Empreiteiro merged 1 commit intomainfrom
feature/ga4-integration
Mar 18, 2026
Merged

feat: add Google Analytics 4 (GA4) integration#77
Empreiteiro merged 1 commit intomainfrom
feature/ga4-integration

Conversation

@Empreiteiro
Copy link
Copy Markdown
Owner

Summary

  • Add GA4 as a new data source with 7 tables (page_views, traffic_sources, events, user_demographics, device_data, conversions, ecommerce) and 5 report templates
  • Backend: ask_ga4.py script using JWT-based auth with service account JSON, GA4 Data API runReport, and LLM + SQLite for natural language Q&A
  • Backend: ga4_router.py with test-connection, discover, and refresh-metadata endpoints
  • Frontend: GA4SourceForm.tsx with service account JSON upload, property ID input, and test connection flow
  • Wired into all integration points: ask router, CRUD valid types, main.py router registration, AddSourceModal, apiClient, and i18n (EN/PT/ES)

Closes #67

Test plan

  • Upload a GA4 service account JSON and enter a property ID
  • Test connection succeeds with valid credentials
  • Connect creates source and fetches metadata (7 tables)
  • Ask a question against the GA4 source and receive an LLM-generated answer with SQL
  • Verify i18n strings render correctly in EN, PT, and ES
  • Run npm run typecheck (passes)

🤖 Generated with Claude Code

@Empreiteiro Empreiteiro force-pushed the feature/ga4-integration branch from fa55af5 to b06cfc4 Compare March 18, 2026 21:53
…port templates

Closes #67

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Empreiteiro Empreiteiro force-pushed the feature/ga4-integration branch from b06cfc4 to 40a16fb Compare March 18, 2026 22:01
@Empreiteiro Empreiteiro merged commit e8b0f04 into main Mar 18, 2026
0 of 2 checks 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.

feat: Google Analytics 4 integration with fixed schema and report templates

1 participant