chore: add posthog to course-app

This commit is contained in:
Rotimi Best
2024-12-21 12:26:18 +01:00
parent f9bce74254
commit feec5c8ee3
3 changed files with 19 additions and 6 deletions
+1
View File
@@ -40,6 +40,7 @@
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15",
"lucide-svelte": "^0.468.0",
"posthog-js": "^1.180.1",
"svelte-inview": "^4.0.4",
"svelte-motion": "^0.12.2",
"svelte-radix": "^2.0.1"
+13 -4
View File
@@ -1,10 +1,19 @@
<script lang="ts">
import { Toaster } from '$lib/components/ui/sonner';
import { Navigation } from '$lib/components/navigation';
import { Toaster } from '$lib/components/ui/sonner';
import { Navigation } from '$lib/components/navigation';
import posthog from 'posthog-js';
import '../app.css';
import '../app.css';
import { onMount } from 'svelte';
let { children } = $props();
let { children } = $props();
onMount(() => {
posthog.init('phc_5eTGKfeGcwOjhS05omKVvnSP1OBS6w2y5JsOVTYhb0J', {
api_host: 'https://eu.i.posthog.com',
person_profiles: 'identified_only' // or 'always' to create profiles for anonymous users as well
});
});
</script>
<Toaster />