feat: add Plausible analytics to Vue SPA and docs
Some checks failed
CI / Frontend (Vue) (push) Failing after 20s
CI / Backend (Python) (push) Failing after 1m13s
Mirror / mirror (push) Failing after 7s

This commit is contained in:
pyr0ball 2026-04-16 21:15:55 -07:00
parent 1c9bfc9fb6
commit 280f4271a5
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

@ -70,3 +70,6 @@ nav:
- Tier System: reference/tier-system.md - Tier System: reference/tier-system.md
- LLM Router: reference/llm-router.md - LLM Router: reference/llm-router.md
- Config Files: reference/config-files.md - Config Files: reference/config-files.md
extra_javascript:
- plausible.js

View file

@ -11,6 +11,9 @@
html, body { margin: 0; background: #eaeff8; min-height: 100vh; } html, body { margin: 0; background: #eaeff8; min-height: 100vh; }
@media (prefers-color-scheme: dark) { html, body { background: #16202e; } } @media (prefers-color-scheme: dark) { html, body { background: #16202e; } }
</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. -->