Skip to content

Add lightweight website measurement and improvement loop#83

Merged
masarray merged 15 commits into
mainfrom
agent/site-measurement-continuous-improvement
Jul 20, 2026
Merged

Add lightweight website measurement and improvement loop#83
masarray merged 15 commits into
mainfrom
agent/site-measurement-continuous-improvement

Conversation

@masarray

@masarray masarray commented Jul 20, 2026

Copy link
Copy Markdown
Owner

What changed

  • add an optional local analytics client that remains a no-op until a valid GA4 measurement ID is configured
  • measure page views, installer/portable/checksum clicks, language switches, 404 events and browser LCP/CLS/INP
  • respect Do Not Track and disable Google advertising and ad-personalization signals
  • inject the public measurement ID only at deploy time instead of storing it in templates
  • validate instrumentation across all 46 registered product pages while leaving Search Console verification HTML untouched
  • block deployment for broken local links, missing fragments or unresolved measurement placeholders
  • add a weekly and manually runnable private report for most visited pages, English vs Indonesian traffic, download clicks and recurring 404 paths
  • query Search Console for top queries, impressions, clicks, CTR, average position and low-CTR opportunities
  • collect PageSpeed/CrUX Core Web Vitals with Lighthouse lab fallback when field data is unavailable
  • verify deployed sitemap pages, official release assets and actual GitHub Pages 404 behavior
  • keep aggregate Markdown/JSON reports in GitHub Actions artifacts rather than publishing them on the website
  • document read-only variables/secrets, event names, thresholds and the continuous-improvement loop

Data sources

  • GA4 Data API: aggregate page views, event counts and 404 paths
  • Search Console API: queries, pages, clicks, impressions, CTR and position
  • PageSpeed Insights / CrUX: LCP, CLS and INP field evidence
  • deterministic site crawler: internal links, fragments, deployed pages, release assets and 404 status

Safe defaults

The website remains fully functional with measurement disabled until GA4_MEASUREMENT_ID is configured. The reporting engine clearly marks GA4, Search Console or CrUX data unavailable when read-only credentials or sufficient field samples are absent; it never fabricates metrics.

Validation

  • latest-main merge validation: passed
  • deterministic 46-page product website build: passed
  • optional measurement injection and no-op mode: passed
  • page/download/language/404/Core Web Vitals instrumentation contract: passed
  • Do Not Track and advertising-signal boundaries: passed
  • internal links and fragment anchors: 0 errors, 0 warnings
  • offline/no-credential report generation: passed
  • private quality artifact generation: passed
  • existing source/template/SEO/IndexNow/public-boundary contracts: passed
  • ARSAS source, premium UX, GOOSE and SAS invariants: passed
  • ARIEC61850 API compatibility: passed
  • .NET restore and Windows compile: passed
  • portable x64 publish and artifact upload: passed

The scheduled remote GA4/Search Console/PageSpeed report is intentionally not executed on pull requests. It runs weekly or manually after the read-only repository configuration is present.

@masarray
masarray marked this pull request as ready for review July 20, 2026 10:05
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@masarray
masarray merged commit 73aeac9 into main Jul 20, 2026
6 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.

1 participant