Visits are counted by GoatCounter, the blog's own, as host and path: a table's code never reaches the count, and a page reached without a reload is counted too

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CCLa2PaEeCj8njQZSWGqHx
This commit is contained in:
Eric WagonerandClaude Fable 5.1 committed 2026-11-10 19:55:52 -05:00
1 parent 93463a529b
commit a66b0fe3f5
2 files changed
+11

No files matched your search

+5
View File
@@ -23,6 +23,11 @@
<meta name="twitter:title" content="Wyrm" /> <meta name="twitter:title" content="Wyrm" />
<meta name="twitter:description" content="Gary Gygax&#39;s Dragonchess, free in the browser. Chess on three boards, with Dragons in the air and Basilisks below. Play a drake or a friend." /> <meta name="twitter:description" content="Gary Gygax&#39;s Dragonchess, free in the browser. Chess on three boards, with Dragons in the air and Basilisks below. Play a drake or a friend." />
<meta name="twitter:image" content="https://wyrm.kestrelsnest.social/og.png" /> <meta name="twitter:image" content="https://wyrm.kestrelsnest.social/og.png" />
<!-- Visits are counted by GoatCounter, as host and path, with no table's code in the path. -->
<script>
window.goatcounter = { path: () => location.host + location.pathname.replace(/^\/join\/[^/]+/, '/join') };
</script>
<script data-goatcounter="https://kestrelsnest.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
%sveltekit.head% %sveltekit.head%
</head> </head>
<body data-sveltekit-preload-data="hover"> <body data-sveltekit-preload-data="hover">
+6
View File
@@ -1,8 +1,14 @@
<script lang="ts"> <script lang="ts">
import '../app.css'; import '../app.css';
import { afterNavigate } from '$app/navigation';
import Announcement from '$lib/components/Announcement.svelte'; import Announcement from '$lib/components/Announcement.svelte';
let { children } = $props(); let { children } = $props();
// A page reached without a reload is counted as a visit too; the first load counts itself.
afterNavigate(({ type }) => {
if (type !== 'enter') (window as { goatcounter?: { count?: () => void } }).goatcounter?.count?.();
});
</script> </script>
<Announcement /> <Announcement />