From c9e32fa352b512a18b3bea443a6accd6067d7c2e 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 @@

Let's Talk

Ready to discuss your project?

- + {merged.title} diff --git a/static/assets/js/ga-init.js b/static/assets/js/ga-init.js new file mode 100644 index 0000000..5e66bd2 --- /dev/null +++ b/static/assets/js/ga-init.js @@ -0,0 +1,8 @@ +window.dataLayer = window.dataLayer || []; +function gtag(){ window.dataLayer.push(arguments); } + +gtag("js", new Date()); +gtag("config", "G-36F29PDKRT", { + // optional, but often helpful: + anonymize_ip: true, +});