Skip to content

Commit f8e7e66

Browse files
committed
Dashboard: Integrate PostHog for enhanced analytics in Providers component
- Added `PHProvider` and `PostHogPageView` to the `Providers` component for improved user behavior tracking. - Wrapped children and `Toaster` component within `PHProvider` to ensure analytics are captured across the application.
1 parent 6ae54dd commit f8e7e66

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

apps/dashboard/src/app/bridge/components/client/Providers.client.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import { ThemeProvider } from "next-themes";
33
import { Toaster } from "sonner";
44
import { ThirdwebProvider } from "thirdweb/react";
5+
import { PHProvider } from "../../../../lib/posthog/Posthog";
6+
import { PostHogPageView } from "../../../../lib/posthog/PosthogPageView";
57

68
export function Providers({ children }: { children: React.ReactNode }) {
79
return (
@@ -12,8 +14,11 @@ export function Providers({ children }: { children: React.ReactNode }) {
1214
enableSystem={false}
1315
defaultTheme="dark"
1416
>
15-
{children}
16-
<Toaster richColors theme="dark" />
17+
<PHProvider>
18+
<PostHogPageView />
19+
{children}
20+
<Toaster richColors theme="dark" />
21+
</PHProvider>
1722
</ThemeProvider>
1823
</ThirdwebProvider>
1924
);

0 commit comments

Comments
 (0)