Files
Ferrous-Solitaire/solitaire_server/web/game.html
T
funman300 3e006a1e94
Build and Deploy / build-and-push (push) Successful in 4m36s
feat(analytics): replace custom pipeline with Matomo
Removes the hand-rolled analytics endpoint and SQLite event table in favour
of Matomo — a self-hosted, full-featured analytics platform.

k8s:
- Deploy MariaDB 11 + Bitnami Matomo 5 in the solitaire namespace
- Route analytics.aleshym.co ingress to the Matomo service
- Remove Datasette sidecar and its BasicAuth middleware/secret
- Remove the analytics port from the solitaire-server Service

Rust:
- Replace AnalyticsClient (custom HTTP endpoint) with MatomoClient (Matomo
  HTTP Tracking API bulk endpoint); maps game events to Matomo categories
- Add matomo_url + matomo_site_id fields to Settings (serde default → None/1)
- Privacy toggle in Settings now activates when matomo_url is set (not tied
  to SyncBackend::SolitaireServer)
- Remove POST /api/analytics route from solitaire_server

Web:
- Add Matomo JS tracking snippet to game.html (/play page)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 21:10:15 -07:00

64 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ferrous Solitaire — Play</title>
<link rel="stylesheet" href="/web/game.css">
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u = "https://analytics.aleshym.co/";
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '1']);
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s);
})();
</script>
<!-- End Matomo -->
</head>
<body>
<header>
<div class="hud-left">
<a href="/" class="home-link" title="Home">&#8592;</a>
<span class="logo">Ferrous Solitaire</span>
<span id="hud-seed" class="muted"></span>
</div>
<div class="hud-center">
<span id="hud-score">Score: 0</span>
<span id="hud-moves">Moves: 0</span>
<span id="hud-timer">0:00</span>
<span id="hud-stock">Stock: 24</span>
</div>
<div class="hud-right">
<button id="btn-undo" title="Undo (Z)">↩ Undo</button>
<button id="btn-new" title="New game">↺ New</button>
<label class="toggle-label" title="Draw one or three cards">
<input type="checkbox" id="chk-draw3"> Draw 3
</label>
</div>
</header>
<main>
<section id="board">
<div id="card-area"></div>
</section>
</main>
<div id="win-overlay" class="hidden">
<div class="win-card">
<div class="win-title">You Won!</div>
<div id="win-score" class="win-score"></div>
<div id="win-moves" class="win-detail"></div>
<div id="win-time" class="win-detail"></div>
<button id="btn-win-new">Play Again ↺</button>
</div>
</div>
<script type="module" src="/web/game.js"></script>
</body>
</html>