feat: add Plausible analytics to Vue SPA and docs
Some checks failed
CI / Python tests (push) Has been cancelled
CI / Frontend typecheck + tests (push) Has been cancelled
Mirror / mirror (push) Has been cancelled

This commit is contained in:
pyr0ball 2026-04-16 21:15:56 -07:00
parent 9c2a2d6bf2
commit dbe9aaa00b
3 changed files with 7 additions and 0 deletions

1
docs/plausible.js Normal file
View file

@ -0,0 +1 @@
(function(){var s=document.createElement("script");s.defer=true;s.dataset.domain="docs.circuitforge.tech,circuitforge.tech";s.dataset.api="https://analytics.circuitforge.tech/api/event";s.src="https://analytics.circuitforge.tech/js/script.js";document.head.appendChild(s);})();

View file

@ -61,3 +61,6 @@ nav:
- Trust Score Algorithm: reference/trust-scoring.md - Trust Score Algorithm: reference/trust-scoring.md
- Tier System: reference/tier-system.md - Tier System: reference/tier-system.md
- Architecture: reference/architecture.md - Architecture: reference/architecture.md
extra_javascript:
- plausible.js

View file

@ -27,6 +27,9 @@
<style> <style>
html, body { margin: 0; background: #0d1117; min-height: 100vh; } html, body { margin: 0; background: #0d1117; min-height: 100vh; }
</style> </style>
<!-- Plausible analytics: cookie-free, GDPR-compliant, self-hosted.
Skips localhost/127.0.0.1. Reports to hostname + circuitforge.tech rollup. -->
<script>(function(){if(/localhost|127\.0\.0\.1/.test(location.hostname))return;var s=document.createElement('script');s.defer=true;s.dataset.domain=location.hostname+',circuitforge.tech';s.dataset.api='https://analytics.circuitforge.tech/api/event';s.src='https://analytics.circuitforge.tech/js/script.js';document.head.appendChild(s);})();</script>
</head> </head>
<body> <body>
<!-- Mount target only — App.vue root must NOT use id="app". Gotcha #1. --> <!-- Mount target only — App.vue root must NOT use id="app". Gotcha #1. -->