Implement posthog

This commit is contained in:
2025-07-06 14:02:22 +03:00
parent f7d994d02e
commit 1e099d88ae
13 changed files with 209 additions and 41 deletions

View File

@@ -1,6 +1,4 @@
<script setup lang="ts">
import { trackEvent } from "@aptabase/web";
useHead({ title: "Ghostwriter" });
const { user } = useUserSession();
@@ -39,10 +37,6 @@ onMounted(() => {
const saveOp = watchPausable(
preferences,
async (newData) => {
trackEvent("update_preferences", {
enabled: newData.enabled,
});
await $fetch("/api/preferences", {
method: "PUT",
body: toValue(preferences),