Skip to content

Add focused Google Analytics dashboard widgets - #218

Draft
customadesign wants to merge 4 commits into
every-app:mainfrom
customadesign:customadesign/homepage-search-performance-widgets
Draft

Add focused Google Analytics dashboard widgets#218
customadesign wants to merge 4 commits into
every-app:mainfrom
customadesign:customadesign/homepage-search-performance-widgets

Conversation

@customadesign

@customadesign customadesign commented Aug 13, 2026

Copy link
Copy Markdown

What changed

  • adds focused Google Analytics dashboard cards directly after Search performance for connected projects
  • shows visits, conversions, conversion rate, engagement rate, popular pages by views, and top cities by visits
  • adds a separate conversion breakdown with the top five active GA4 key events, their exact Analytics names, event occurrences, and Analytics users
  • gives common events readable labels such as Contact form submission and Sales phone click without hiding the raw event name
  • clarifies that events can repeat, Analytics users are not unique CRM leads, and conversion rate means sessions with at least one key event
  • compares the last 28 complete property-local days with the prior 28-day period
  • adds honest loading, empty, limited-data, connection, quota-retry, and truncated-report states
  • invalidates the dashboard summary when the selected GA4 property changes or disconnects
  • deep-links dashboard actions to the Google Analytics settings section

Why

OpenSEO already surfaces Search Console performance on the homepage, but users still had to leave the product to understand what Analytics counted as a conversion. The new breakdown answers whether conversions are forms, phone clicks, purchases, or other configured key events without recreating the full Analytics interface or implying that event counts equal leads.

Implementation notes

  • uses one GA4 batchRunReports request containing five fixed, all-traffic reports
  • requests the conversion breakdown by eventName with keyEvents and totalUsers, ordered by key-event count
  • aggregates popular pages by pagePath so title changes cannot split totals or duplicate rows
  • normalizes missing and restricted values without fabricating data
  • avoids an exact conversion-type total when Google truncates the report and marks the section as limited
  • preserves safe quota retry hints while keeping upstream payloads and credentials server-side
  • emits privacy-safe error telemetry without property, account, event, or row data

Review

The completed diff received independent reviews for complexity, security/authentication, billing and quota behavior, repository idioms, and product UX/accessibility. Every should-fix finding was independently verified before being changed. Follow-up review confirmed that truncated totals, limited empty states, and long exact event names are handled accurately, with no remaining blocker or should-fix findings.

Validation

  • pnpm ci:check — passed (Prettier, Knip, both TypeScript projects, and type-aware Oxlint)
  • pnpm build — passed (client and SSR production builds plus TypeScript)
  • focused GA4 conversion client/service/render suite — 26 tests passed
  • full pnpm test:ci — 1,033 tests passed across 128 files

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