Skip to content

Commit

Permalink
add plausible for visits analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
d-ivashchuk committed Apr 4, 2024
1 parent c0f570c commit 134d6ab
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"lucide-react": "^0.363.0",
"next": "^14.1.3",
"next-auth": "^4.24.6",
"next-plausible": "^3.12.0",
"next-themes": "^0.3.0",
"posthog-js": "^1.116.6",
"react": "18.2.0",
Expand Down
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions src/components/providers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, { useEffect } from "react";
import posthog from "posthog-js";
import { PostHogProvider, usePostHog } from "posthog-js/react";
import { SessionProvider, useSession } from "next-auth/react";
import PlausibleProvider from "next-plausible";

import { TRPCReactProvider } from "~/trpc/react";
import { env } from "~/env.mjs";
Expand Down Expand Up @@ -46,11 +47,13 @@ const Providers = ({ children }: { children: React.ReactNode }) => {
>
<TRPCReactProvider>
<SessionProvider>
<PostHogProvider client={posthog}>
<TooltipProvider>
<Identification>{children}</Identification>
</TooltipProvider>
</PostHogProvider>
<PlausibleProvider domain={env.NEXT_PUBLIC_DEPLOYMENT_URL}>
<PostHogProvider client={posthog}>
<TooltipProvider>
<Identification>{children}</Identification>
</TooltipProvider>
</PostHogProvider>
</PlausibleProvider>
</SessionProvider>
</TRPCReactProvider>
</ThemeProvider>
Expand Down

0 comments on commit 134d6ab

Please sign in to comment.