✨ Add Analytics
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import '../style/global.scss'
|
||||
|
||||
import { browser } from '$app/env'
|
||||
import { navigating, page } from '$app/stores'
|
||||
import { beforeNavigate } from '$app/navigation'
|
||||
import { onMount, setContext } from 'svelte'
|
||||
@@ -9,6 +10,7 @@
|
||||
import '$utils/polyfills'
|
||||
// Components
|
||||
import SVGSprite from '$components/SVGSprite.svelte'
|
||||
import Analytics from '$components/Analytics.svelte'
|
||||
import Switcher from '$components/molecules/Switcher.svelte'
|
||||
import Footer from '$components/organisms/Footer.svelte'
|
||||
|
||||
@@ -63,6 +65,13 @@
|
||||
|
||||
<SVGSprite />
|
||||
|
||||
{#if browser}
|
||||
<Analytics
|
||||
appKey={import.meta.env.VITE_ANALYTICS_KEY}
|
||||
url={import.meta.env.VITE_ANALYTICS_URL}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
|
||||
<script context="module" lang="ts">
|
||||
import type { LoadEvent, LoadOutput } from '@sveltejs/kit'
|
||||
|
||||
Reference in New Issue
Block a user