delayed loading of umami tracker script until page is already

interactive
This commit is contained in:
George Powell
2026-02-03 00:18:11 -05:00
parent 2bd86d37a1
commit 2058149207
2 changed files with 24 additions and 2 deletions

View File

@@ -1,17 +1,31 @@
<script lang="ts">
import { onMount } from 'svelte';
import { browser } from '$app/environment';
import "./layout.css";
import favicon from "$lib/assets/favicon.ico";
onMount(() => {
if (browser) {
const script = document.createElement('script');
script.defer = true;
script.src = 'https://umami.snail.city/script.js';
script.setAttribute('data-website-id', '5b8c31ad-71cd-4317-940b-6bccea732acc');
script.setAttribute('data-domains', 'bibdle.com,www.bibdle.com');
document.body.appendChild(script);
}
});
let { children } = $props();
</script>
<svelte:head>
<link rel="icon" href={favicon} />
<script
<!-- <script
defer
src="https://umami.snail.city/script.js"
data-website-id="5b8c31ad-71cd-4317-940b-6bccea732acc"
data-domains="bibdle.com,www.bibdle.com"
></script>
></script> -->
</svelte:head>
{@render children()}

View File

@@ -59,12 +59,20 @@ I created Bibdle from a combination of two things. The first is my lifelong desi
# done
## february 2nd
- created rss feed
- fixed "first letter" clue edge cases
- updated ranking formula
## january 28th
- add percentile stats, update chapter guess UI
- fixed middle statline (removed meaningless %)
- added instructions
- added email button
- added test buttons for 3.0 UI/UX
- package upgrades
## january 26th