diff --git a/app/_components/google-analytics.tsx b/app/_components/google-analytics.tsx new file mode 100644 index 00000000..57df01e9 --- /dev/null +++ b/app/_components/google-analytics.tsx @@ -0,0 +1,5 @@ +'use client'; + +import { GoogleAnalytics } from "nextjs-google-analytics"; + +export const Analytics = () => ; \ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx index f7cd58af..49d905a7 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -5,6 +5,7 @@ import { cn } from '@/lib/utils'; import './globals.css'; import { sans } from './fonts'; import { AnalyticsWrapper } from './_components/analytics'; +import { Analytics } from './_components/google-analytics'; import { SiteHeader } from './_components/site-header'; import { SiteFooter } from './_components/site-footer'; @@ -34,6 +35,7 @@ const Layout = ({ children }: LayoutProps) => ( + ); diff --git a/lib/config.ts b/lib/config.ts index 6dad2e13..b235e68a 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -4,12 +4,6 @@ export const baseUrl = process.env.NEXT_PUBLIC_APP_URL ?? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`; -export const dbConfig = { - host: process.env.DATABASE_HOST, - username: process.env.DATABASE_USERNAME, - password: process.env.DATABASE_PASSWORD, -}; - // Settings // --------------- export const pointsUpdateDate = '2023-06-01'; diff --git a/package.json b/package.json index e7a22594..45c44bc7 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "kysely": "0.26.3", "mysql2": "3.6.2", "next": "14.0.0", + "nextjs-google-analytics": "^2.3.3", "p-limit": "4.0.0", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 96579897..7e533ce4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,6 +56,9 @@ dependencies: next: specifier: 14.0.0 version: 14.0.0(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + nextjs-google-analytics: + specifier: ^2.3.3 + version: 2.3.3(next@14.0.0)(react@18.2.0) p-limit: specifier: 4.0.0 version: 4.0.0 @@ -5296,6 +5299,18 @@ packages: - babel-plugin-macros dev: false + /nextjs-google-analytics@2.3.3(next@14.0.0)(react@18.2.0): + resolution: {integrity: sha512-Y6sI6A7wt5dji8hYBnVkOh9LTyImSLFZXx3FpyQgVW7W4b4qEFHjH2u3fhDJsrRZeLlUGM8/RuHD/mhHc2Axfg==} + peerDependencies: + next: '>=11.0.0' + react: '>=17.0.0' + dependencies: + next: 14.0.0(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + react: 18.2.0 + optionalDependencies: + fsevents: 2.3.3 + dev: false + /node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'}