Introduce analytics

This commit is contained in:
2025-05-22 16:01:34 +03:00
parent e080f3978c
commit 76338eff71
4 changed files with 40 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
<script setup lang="ts">
import { trackEvent } from "@aptabase/web";
import type { FormSubmitEvent } from "@nuxt/ui";
const { user } = useUserSession();
@@ -34,6 +35,10 @@ const validate = ({
};
const submit = async (event: FormSubmitEvent<typeof formData>) => {
trackEvent("rewrite_activity", {
activityUrl: event.data.activityUrl,
});
await $fetch("/api/rewrite", {
method: "POST",
query: {