Skip to content

Add Google Analytics across the documentation website - #159

Merged
MelbourneDeveloper merged 1 commit into
mainfrom
codex/google-analytics-tag
Oct 3, 2026
Merged

MelbourneDeveloper merged 1 commit into
mainfrom
codex/google-analytics-tag

Conversation

@MelbourneDeveloper

Copy link
Copy Markdown
Owner

TLDR;

Load Google Analytics measurement ID G-PGDS00DBRX from the shared website head on every page.

Details

  • Add the async Google tag loader and its standard initialization to the shared layout.
  • Allow only the exact analytics script URL through the site audit while preserving the 2,500-byte CSS budget and restrictions on other external scripts.
  • Stub Google requests in browser tests so automated runs do not generate analytics visits.

How Do The Tests Prove The Changes Work?

Shared browser assertions verify one async tag and one ordered initialization/configuration sequence on every tested HTML page. Focused tests cover English and Chinese page families, navigation, and reloads. Guard tests reject altered script URLs and preserve CSS restrictions.

Validation: 108 browser tests and 26 supporting tests pass with no failures or skips. The build audits all 110 pages; shipped CSS remains 2,491 bytes.

@MelbourneDeveloper
MelbourneDeveloper merged commit 16b8c4f into main Oct 3, 2026
8 checks passed
@MelbourneDeveloper
MelbourneDeveloper deleted the codex/google-analytics-tag branch October 3, 2026 13:29
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