feat: implementing posthog logs

This commit is contained in:
2025-11-15 11:10:39 +00:00
parent 19edcd91bc
commit 2be1521e76
4 changed files with 32 additions and 1 deletions

1
packages/frontend/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.env

View File

@@ -53,6 +53,7 @@
"lucide-react": "^0.462.0",
"next-themes": "^0.3.0",
"playwright": "^1.56.1",
"posthog-js": "^1.292.0",
"react": "^18.3.1",
"react-day-picker": "^8.10.1",
"react-dom": "^18.3.1",

View File

@@ -1,5 +1,21 @@
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.tsx";
import "./index.css";
import { PostHogProvider } from "posthog-js/react";
createRoot(document.getElementById("root")!).render(<App />);
createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<PostHogProvider
apiKey={import.meta.env.VITE_PUBLIC_POSTHOG_KEY}
options={{
api_host: import.meta.env.VITE_PUBLIC_POSTHOG_HOST,
defaults: '2025-05-24',
capture_exceptions: true,
debug: import.meta.env.MODE === "development",
}}
>
<App />
</PostHogProvider>
</React.StrictMode>
);