Skip to content

docs: cookieless page-view counter and privacy page - #23

Merged
featurescript merged 3 commits into
mainfrom
docs/analytics
Oct 26, 2026
Merged

featurescript merged 3 commits into
mainfrom
docs/analytics

Conversation

@featurescript

@featurescript featurescript commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Adds a page-view counter to the docs site (libraries.horizon36596.org/simloop/) and a short Privacy page that says what it collects.

  • SimLoop/docs/assets/javascripts/pageviews.js, loaded through extra_javascript. It sends one request per page view to GoatCounter's documented /count endpoint (page path and title, referrer, screen size). It loads no third-party script, because these pages share an origin with the other sites on libraries.horizon36596.org, so an outside script could read their browser storage. No cookies, no local storage. It does nothing until GOATCOUNTER_CODE is set, and counts only on libraries.horizon36596.org, so local mkdocs serve is not counted.
  • SimLoop/docs/privacy.md, in the Help section of the nav. It also says the fonts load from Google Fonts, which was true before this PR.
  • ./gradlew :SimLoop:docsSite (mkdocs --strict) and the leak gate pass. The script was checked with a stubbed browser: one correct request on the live host, none on localhost or with the placeholder code.

Before it counts: create the GoatCounter site and replace the placeholder. Public repo: needs the owner's hand review before merge.

@github-actions

Copy link
Copy Markdown

Test Results

1 220 tests  +1 220   1 220 ✅ +1 220   11s ⏱️ +11s
  111 suites +  111       0 💤 ±    0 
  111 files   +  111       0 ❌ ±    0 

Results for commit f18e1e2. ± Comparison against base commit 97a5630.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Test Results

1 259 tests  ±0   1 259 ✅ ±0   12s ⏱️ +3s
  116 suites ±0       0 💤 ±0 
  116 files   ±0       0 ❌ ±0 

Results for commit a8cb06f. ± Comparison against base commit 8eb1346.

♻️ This comment has been updated with latest results.

@featurescript

Copy link
Copy Markdown
Contributor Author

Local checks (GitHub Actions cannot run while this repo is private; the org billing block). Run on this laptop, 2026-10-24, at 6142e60:

Latest main merged in; the one conflict (SimLoop/mkdocs.yml) now loads both the alpha notice and the counter; GOATCOUNTER_CODE set to horizon36596.

  • python -m mkdocs build --strict: passed (docs-only PR; no Java changed, so the Gradle suite is unchanged from main)
  • leak gate: passed, 10 rules, 387 files, no violations
  • gitleaks: no leaks found, 41 commits scanned

gitleaks 8.30.1 (the version the workflow pins, checksum verified). These are the same three checks the checks ruleset requires (test, leak-gate, secret-scan); GitHub runs them for real after the public flip, and this merges once they are green.

The docs share an origin with the other sites on libraries.horizon36596.org,
so pageviews.js calls GoatCounter's documented /count endpoint itself
instead of loading count.js. The privacy page says exactly what is sent,
and that the fonts load from Google Fonts.
@featurescript
featurescript merged commit f9b7828 into main Oct 26, 2026
7 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