From 9bf06d8cb025933c88ddc8626082073dc0a8b160 Mon Sep 17 00:00:00 2001
From: mifi
Date: Sun, 1 Feb 2026 00:19:02 -0300
Subject: [PATCH] GA Fixes and CWV improvements
---
scripts/critters.mjs | 4 ++--
src/lib/components/Hero.svelte | 2 +-
src/lib/components/ScheduleSection.svelte | 2 +-
src/routes/+layout.svelte | 10 +---------
static/assets/js/ga-init.js | 8 ++++++++
5 files changed, 13 insertions(+), 13 deletions(-)
create mode 100644 static/assets/js/ga-init.js
diff --git a/scripts/critters.mjs b/scripts/critters.mjs
index 4cec513..cb6e96e 100644
--- a/scripts/critters.mjs
+++ b/scripts/critters.mjs
@@ -46,7 +46,7 @@ async function main() {
const critters = new Critters({
path: DIST,
- preload: 'swap',
+ preload: 'default',
noscriptFallback: true,
pruneSource: false,
logLevel: 'warn',
@@ -57,7 +57,7 @@ async function main() {
const filePath = path.join(DIST, file);
let html = fs.readFileSync(filePath, 'utf8');
html = await critters.process(html);
- html = postProcessSwapLinks(html);
+ // html = postProcessSwapLinks(html);
fs.writeFileSync(filePath, html, 'utf8');
console.log('✓ Critical CSS inlined → dist/' + file);
}
diff --git a/src/lib/components/Hero.svelte b/src/lib/components/Hero.svelte
index 378c832..06e5e86 100644
--- a/src/lib/components/Hero.svelte
+++ b/src/lib/components/Hero.svelte
@@ -12,7 +12,7 @@