From f6979778ee0f30e4542b02605975af8e14f9568d Mon Sep 17 00:00:00 2001 From: Oleh Proidakov Date: Sat, 3 Aug 2024 02:25:52 +0300 Subject: [PATCH] v3.3/add-Google-Analytics --- package-lock.json | 56 ++++++++++++++++++++++++++----------------- package.json | 2 +- src/app/layout.tsx | 2 ++ src/app/providers.tsx | 2 -- 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index d89d36e..98cbc4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,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", @@ -20,7 +21,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" @@ -1652,6 +1652,18 @@ "node": ">= 10" } }, + "node_modules/@next/third-parties": { + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/third-parties/-/third-parties-14.2.5.tgz", + "integrity": "sha512-PDRJm8RZ3rnGNporHKjcdCeZqoW8iJ5uP0clo1Z08TqJiQzuntJ66zrGYCJyqTakx62UJNOp73YsQCFo6kbYYg==", + "dependencies": { + "third-party-capital": "1.0.20" + }, + "peerDependencies": { + "next": "^13.0.0 || ^14.0.0", + "react": "^18.2.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3694,6 +3706,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } @@ -5020,18 +5033,6 @@ } } }, - "node_modules/nextjs-google-analytics": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/nextjs-google-analytics/-/nextjs-google-analytics-2.3.3.tgz", - "integrity": "sha512-Y6sI6A7wt5dji8hYBnVkOh9LTyImSLFZXx3FpyQgVW7W4b4qEFHjH2u3fhDJsrRZeLlUGM8/RuHD/mhHc2Axfg==", - "optionalDependencies": { - "fsevents": "^2.3.2" - }, - "peerDependencies": { - "next": ">=11.0.0", - "react": ">=17.0.0" - } - }, "node_modules/normalize-package-data": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", @@ -6251,6 +6252,11 @@ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" }, + "node_modules/third-party-capital": { + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/third-party-capital/-/third-party-capital-1.0.20.tgz", + "integrity": "sha512-oB7yIimd8SuGptespDAZnNkzIz+NWaJCu2RMsbs4Wmp9zSDUM8Nhi3s2OOcqYuv3mN4hitXc8DVx+LyUmbUDiA==" + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -7802,6 +7808,14 @@ "integrity": "sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==", "optional": true }, + "@next/third-parties": { + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/third-parties/-/third-parties-14.2.5.tgz", + "integrity": "sha512-PDRJm8RZ3rnGNporHKjcdCeZqoW8iJ5uP0clo1Z08TqJiQzuntJ66zrGYCJyqTakx62UJNOp73YsQCFo6kbYYg==", + "requires": { + "third-party-capital": "1.0.20" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -9297,7 +9311,8 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "optional": true + "optional": true, + "peer": true }, "function-bind": { "version": "1.1.2", @@ -10229,14 +10244,6 @@ "watchpack": "2.4.0" } }, - "nextjs-google-analytics": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/nextjs-google-analytics/-/nextjs-google-analytics-2.3.3.tgz", - "integrity": "sha512-Y6sI6A7wt5dji8hYBnVkOh9LTyImSLFZXx3FpyQgVW7W4b4qEFHjH2u3fhDJsrRZeLlUGM8/RuHD/mhHc2Axfg==", - "requires": { - "fsevents": "^2.3.2" - } - }, "normalize-package-data": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", @@ -11071,6 +11078,11 @@ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" }, + "third-party-capital": { + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/third-party-capital/-/third-party-capital-1.0.20.tgz", + "integrity": "sha512-oB7yIimd8SuGptespDAZnNkzIz+NWaJCu2RMsbs4Wmp9zSDUM8Nhi3s2OOcqYuv3mN4hitXc8DVx+LyUmbUDiA==" + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", diff --git a/package.json b/package.json index 6754735..a55db97 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e198f72..21bf7bb 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -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', @@ -43,6 +44,7 @@ export default function RootLayout({ + {children} diff --git a/src/app/providers.tsx b/src/app/providers.tsx index b432e04..f7cba9e 100644 --- a/src/app/providers.tsx +++ b/src/app/providers.tsx @@ -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 ( <> - {children} );