Skip to content

Commit

Permalink
Add Simple Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudlena committed May 9, 2024
1 parent d76528b commit 38e1e83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<script lang="ts">
import 'bulma/css/bulma.css';
import { addMessages, init, getLocaleFromQueryString } from 'svelte-i18n';
import { dev } from '$app/environment';
import en from '$lib/locales/en.json';
import de from '$lib/locales/de.json';
import ch from '$lib/locales/ch.json';
import Navigation from './Navigation.svelte';
import Footer from './Footer.svelte';
import Analytics from './Analytics.svelte';
import './styles.css';
addMessages('en-US', en);
Expand All @@ -27,3 +29,7 @@

<Footer />
</div>

{#if !dev}
<Analytics />
{/if}
3 changes: 3 additions & 0 deletions src/routes/Analytics.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<svelte:head>
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
</svelte:head>

0 comments on commit 38e1e83

Please sign in to comment.