Skip to content

Commit 8fc2cf2

Browse files
committed
feat: add browser and origin check for Umami Analytics script inclusion
1 parent db1bf5d commit 8fc2cf2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/routes/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@
252252
{#if !noEmbedUrls.some((url) => page.url.pathname.startsWith(url))}
253253
<link rel="icon" href="/favicon.png" sizes="32x32" type="image/png" />
254254
{/if}
255-
{#if PUBLIC_UMAMI_SCRIPT_URL && PUBLIC_UMAMI_WEBSITE_ID && !dev && !building}
255+
{#if PUBLIC_UMAMI_SCRIPT_URL && PUBLIC_UMAMI_WEBSITE_ID && !dev && !building && browser && window?.location?.origin}
256256
<script
257257
defer
258258
src={PUBLIC_UMAMI_SCRIPT_URL}

0 commit comments

Comments
 (0)