Skip to content

Commit 7786f7a

Browse files
authored
fix: init plausible script (#1946)
1 parent 2bd32e5 commit 7786f7a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/routes/+layout.svelte

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,4 +286,11 @@
286286
<Toast message={currentError} />
287287
{/if}
288288
{@render children?.()}
289+
290+
{#if publicConfig.PUBLIC_PLAUSIBLE_SCRIPT_URL}
291+
<script>
292+
window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};
293+
plausible.init()
294+
</script>
295+
{/if}
289296
</div>

0 commit comments

Comments
 (0)