You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 16b8c4f
Browse filesBrowse the repository at this point in the historyBrowse files
Add Google Analytics across the documentation website
# 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.
0 commit comments