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:54 -05:00
1 parent ee7b1d68ec
commit 6a9dc5a496
3 files changed
+16

No files matched your search

+5
View File
@@ -127,6 +127,11 @@
.hall-announcement { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; gap: .8rem; padding: .45rem 2.4rem .45rem 1rem; background: #f2c45a; color: #1d1a12; font: 500 .95rem/1.35 system-ui, -apple-system, 'Segoe UI', sans-serif; text-align: center; box-shadow: 0 1px 4px #0005; }
.hall-announcement button { position: absolute; right: .5rem; background: none; border: 0; color: inherit; font-size: 1.3rem; line-height: 1; padding: .2rem .5rem; cursor: pointer; }
</style>
<!-- Visits are counted by GoatCounter, as host and path. -->
<script>
window.goatcounter = { path: () => location.host + location.pathname };
</script>
<script data-goatcounter="https://kestrelsnest.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
</head>
<body>
<div class="wrap">
+5
View File
@@ -22,6 +22,11 @@
<meta name="twitter:title" content="__NAME__" />
<meta name="twitter:description" content="__NAME__, a game between friends, free in the browser." />
<meta name="twitter:image" content="https://__DOMAIN__/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%
</head>
<body data-sveltekit-preload-data="hover">
+6
View File
@@ -1,8 +1,14 @@
<script lang="ts">
import '../app.css';
import { afterNavigate } from '$app/navigation';
import Announcement from '$lib/components/Announcement.svelte';
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>
<Announcement />