Skip to content

Commit

Permalink
feat(analytics): add Plausible
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoulaud committed Sep 25, 2024
1 parent 31a292a commit cbf8dc3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env
.env*.local

# vercel
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"js-cookie": "^3.0.5",
"lucide-react": "^0.428.0",
"next": "14.2.5",
"next-plausible": "^3.12.2",
"react": "^18",
"react-dom": "^18",
"react-hook-form": "^7.52.2",
Expand Down
16 changes: 16 additions & 0 deletions pnpm-lock.yaml

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

9 changes: 6 additions & 3 deletions src/app/providers/AppProviders.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';

import { ApolloWrapper } from '@/lib/apollo-client';
import PlausibleProvider from 'next-plausible';
import { ReactNode } from 'react';
import { AuthProvider } from './AuthProvider';

Expand All @@ -10,8 +11,10 @@ interface AppProvidersProps {

export default function AppProviders({ children }: AppProvidersProps) {
return (
<ApolloWrapper>
<AuthProvider>{children}</AuthProvider>
</ApolloWrapper>
<PlausibleProvider domain={process.env.NEXT_PUBLIC_BASE_URL as string}>
<ApolloWrapper>
<AuthProvider>{children}</AuthProvider>
</ApolloWrapper>
</PlausibleProvider>
);
}

0 comments on commit cbf8dc3

Please sign in to comment.