From 2554addc63fd31da2cc55b53311a5f4a114804a0 Mon Sep 17 00:00:00 2001 From: TheHoltz Date: Mon, 22 Jan 2024 22:08:37 -0300 Subject: [PATCH] feat: :sparkles: analytics update --- app/layout.tsx | 52 +++++++++++++++++++++----------------------------- package.json | 1 + yarn.lock | 12 ++++++++++++ 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/app/layout.tsx b/app/layout.tsx index 5750e99..eeb8ef8 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,50 +4,42 @@ import "@fontsource/roboto-mono/600.css"; import "@fontsource/roboto-mono/700.css"; import { Inter, Roboto } from "next/font/google"; -import Script from "next/script"; +import { GoogleAnalytics } from "@next/third-parties/google"; import type { Metadata } from "next"; import Navbar from "./components/Navbar"; const GTM_ID = process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS; export const metadata: Metadata = { - title: "Irys Provenance Toolkit", - description: "UI toolkit to kickstart your next projet", + title: "Irys Provenance Toolkit", + description: "UI toolkit to kickstart your next projet", }; const roboto = Roboto({ - weight: "400", - subsets: ["latin"], - display: "swap", + weight: "400", + subsets: ["latin"], + display: "swap", }); // If loading a variable font, you don't need to specify the font weight const inter = Inter({ - subsets: ["latin"], - display: "swap", + subsets: ["latin"], + display: "swap", }); -export default function RootLayout({ children }: { children: React.ReactNode }) { - const GA_TRACKING_ID = process.env.NEXT_PUBLIC_GA_ID; - - return ( - - {GTM_ID && ( - - )} - - - {children} - - - ); +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + {GTM_ID && } + + + {children} + + + ); } diff --git a/package.json b/package.json index 996ace3..063ef10 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@irys/query": "^0.0.1", "@irys/sdk": "^0.0.1", "@lit-protocol/lit-node-client": "^3.0.2", + "@next/third-parties": "^14.1.0", "@solana/web3.js": "^1.87.3", "@types/node": "20.5.6", "@types/react": "18.2.21", diff --git a/yarn.lock b/yarn.lock index cab5e06..8c17636 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1453,6 +1453,13 @@ resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.1.tgz#be3dd8b3729ec51c99ff04b51e2b235756d02b6e" integrity sha512-FFp3nOJ/5qSpeWT0BZQ+YE1pSMk4IMpkME/1DwKBwhg4mJLB9L+6EXuJi4JEwaJdl5iN+UUlmUD3IsR1kx5fAg== +"@next/third-parties@^14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/third-parties/-/third-parties-14.1.0.tgz#d9604fff8880e05d3804d2cf7ab42eb5430aec69" + integrity sha512-f55SdvQ1WWxi4mb5QqtYQh5wRzbm1XaeP7s39DPn4ks3re+n9VlFccbMxBRHqkE62zAyIKmvkUB2cByT/gugGA== + dependencies: + third-party-capital "1.0.20" + "@noble/curves@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" @@ -7197,6 +7204,11 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +third-party-capital@1.0.20: + version "1.0.20" + resolved "https://registry.yarnpkg.com/third-party-capital/-/third-party-capital-1.0.20.tgz#e218a929a35bf4d2245da9addb8ab978d2f41685" + integrity sha512-oB7yIimd8SuGptespDAZnNkzIz+NWaJCu2RMsbs4Wmp9zSDUM8Nhi3s2OOcqYuv3mN4hitXc8DVx+LyUmbUDiA== + thread-stream@^0.15.1: version "0.15.2" resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-0.15.2.tgz#fb95ad87d2f1e28f07116eb23d85aba3bc0425f4"