Skip to content

Commit

Permalink
v3.3/add-Google-Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
GodHermit committed Aug 2, 2024
1 parent 6352d79 commit f697977
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 25 deletions.
56 changes: 34 additions & 22 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@cloudinary/url-gen": "^1.10.0",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@next/third-parties": "^14.2.5",
"@types/node": "18.15.11",
"@types/react": "18.0.35",
"@types/react-dom": "18.0.11",
Expand All @@ -27,7 +28,6 @@
"framer-motion": "^10.18.0",
"gts": "^5.3.1",
"next": "^13.5.6",
"nextjs-google-analytics": "^2.3.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "5.0.4"
Expand Down
2 changes: 2 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Providers } from './providers';
import variables from '@/theme/variables.module.scss';
import { GoogleAnalytics } from '@next/third-parties/google';

export const metadata = {
title: 'Oleh Proidakov',
Expand Down Expand Up @@ -43,6 +44,7 @@ export default function RootLayout({
<html lang="en">
<head />
<body>
<GoogleAnalytics gaId="G-3K2LVX6MD1" />
<Providers>{children}</Providers>
</body>
</html>
Expand Down
2 changes: 0 additions & 2 deletions src/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import { ChakraProvider } from '@chakra-ui/react';
import theme from '@/theme';
import { GoogleAnalytics } from 'nextjs-google-analytics';

export function Providers({ children }: { children: React.ReactNode }) {
return (
<>
<GoogleAnalytics trackPageViews />
<ChakraProvider theme={theme}>{children}</ChakraProvider>
</>
);
Expand Down

0 comments on commit f697977

Please sign in to comment.