site: first-party, cookieless visit stats (self-hosted Umami at storebound.dev/s/, Do Not Track respected) with events for copy buttons, desktop downloads per OS, the teaser (play, 50 %, complete) and outbound docs / git / npm links; a privacy note in the footer; docs/site-analytics.md and tools/vds/ configs to rebuild the server side; scrub allows a page's public stats website id

This commit is contained in:
CRTkafa 2026-10-14 11:11:13 +08:00
parent 83c14d3a8e
commit 34c2fa22e5
7 changed files with 129 additions and 3 deletions

View file

@ -0,0 +1,16 @@
# storebound.dev first-party stats (Umami in /opt/umami on 127.0.0.1:3920), included in the :443 vhost.
# Neutral paths only: /s/p.js (script) and /s/e (collect). See docs/site-analytics.md.
# The real visitor IP: only Cloudflare may set CF-Connecting-IP; Umami reads it from X-Sb-Client.
RemoteIPHeader CF-Connecting-IP
# RemoteIPTrustedProxy lines from https://www.cloudflare.com/ips-v4 and ips-v6 (docs/site-analytics.md)
Include /etc/apache2/cloudflare-trusted-proxies.conf
ProxyRequests Off
<Location "/s/p.js">
ProxyPass http://127.0.0.1:3920/p.js retry=0 timeout=10
Header set Cache-Control "public, max-age=3600"
</Location>
<Location "/s/e">
ProxyPass http://127.0.0.1:3920/e retry=0 timeout=10
RequestHeader set X-Sb-Client "expr=%{REMOTE_ADDR}"
Header always set Cache-Control "no-store"
</Location>