Skip to content

best way to save what you love

web/layout: don't load the plausible script when analytics are disabled

wukko32950328829b
diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte
index 28f3fdfd..2f419223 100644
--- a/web/src/routes/+layout.svelte
+++ b/web/src/routes/+layout.svelte
@@ -67,7 +67,7 @@
<meta name="theme-color" content={statusBarColors[$currentTheme]} />
{/if}
- {#if env.PLAUSIBLE_ENABLED}
+ {#if browser && env.PLAUSIBLE_ENABLED && !$settings.privacy.disableAnalytics}
<script
defer
data-domain={env.HOST}