From 83cb2bd950466bae7492e8195dcdc350d4183ad9 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Mon, 19 Jan 2026 14:04:00 +0100 Subject: [PATCH] feat: move analytics script to env --- app/.env | 1 + app/src/app.html | 1 - app/src/lib/config.ts | 2 ++ app/src/routes/+layout.svelte | 7 +++++++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 app/.env create mode 100644 app/src/lib/config.ts diff --git a/app/.env b/app/.env new file mode 100644 index 0000000..1c9c594 --- /dev/null +++ b/app/.env @@ -0,0 +1 @@ +PUBLIC_ANALYTIC_SCRIPT="" diff --git a/app/src/app.html b/app/src/app.html index b858bee..addab35 100644 --- a/app/src/app.html +++ b/app/src/app.html @@ -5,7 +5,6 @@ - %sveltekit.head% Nodes {@render children?.()} + + + {#if config.ANALYTIC_SCRIPT} + {@html config.ANALYTIC_SCRIPT} + {/if} +