diff --git a/apps/site/src/app/not-found.tsx b/apps/site/src/app/not-found.tsx index 671ffd950e..78501fc8bb 100644 --- a/apps/site/src/app/not-found.tsx +++ b/apps/site/src/app/not-found.tsx @@ -1,6 +1,6 @@ import GlitchParticles from "@/components/glitch-particles"; +import { NotFoundTracker } from "@/components/not-found-tracker"; import type { Metadata } from "next"; -import Link from "next/link"; export const metadata: Metadata = { title: "404 - Page Not Found", @@ -10,6 +10,7 @@ export const metadata: Metadata = { export default function NotFound() { return (
+

Prisma Website | 404

diff --git a/apps/site/src/components/not-found-tracker.tsx b/apps/site/src/components/not-found-tracker.tsx new file mode 100644 index 0000000000..9cb6fddf8b --- /dev/null +++ b/apps/site/src/components/not-found-tracker.tsx @@ -0,0 +1,15 @@ +"use client"; + +import posthog from "posthog-js"; +import { useEffect } from "react"; + +export function NotFoundTracker() { + useEffect(() => { + posthog.capture("site:404_not_found", { + $current_url: window.location.href, + pathname: window.location.pathname, + }); + }, []); + + return null; +}