Skip to content

Commit

Permalink
posthog
Browse files Browse the repository at this point in the history
  • Loading branch information
catdevnull committed Feb 5, 2025
1 parent 16080bd commit 4812227
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions sitio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"markdown-it-table-of-contents": "^0.6.0",
"mode-watcher": "^0.5.0",
"nanoid": "^5.0.9",
"posthog-js": "^1.215.3",
"svelte-echarts": "^0.1.1",
"svelte-mq-store": "^2.2.22",
"svelte-radix": "^2.0.1",
Expand Down
14 changes: 14 additions & 0 deletions sitio/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
import { ModeWatcher } from "mode-watcher";
import { dev } from "$app/environment";
import posthog from "posthog-js";
import { browser } from "$app/environment";
import { onMount } from "svelte";
onMount(() => {
if (browser) {
posthog.init("phc_II79EjC3Nzv1PCndY5L7VK7oDcdjux2SdbNZMvtKuMy", {
api_host: "https://us.i.posthog.com",
person_profiles: "identified_only", // or 'always' to create profiles for anonymous users as well
});
}
return;
});
</script>

<svelte:head>
Expand Down

0 comments on commit 4812227

Please sign in to comment.