From 8bc7cedba937b085e6d853f87813a05d3163fe9a Mon Sep 17 00:00:00 2001 From: Aryan Kothariset -g allow-passthrough on <87589047+thearyadev@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:07:55 -0500 Subject: [PATCH 1/2] remove vercel analytics --- frontend/package-lock.json | 63 -------------------------------------- frontend/package.json | 6 ++-- 2 files changed, 2 insertions(+), 67 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 05b54f04..498f4601 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,8 +11,6 @@ "@mantine/core": "^7.11.1", "@mantine/hooks": "^7.9.2", "@tabler/icons-react": "^3.8.0", - "@vercel/analytics": "^1.3.1", - "@vercel/speed-insights": "^1.0.11", "classnames": "^2.5.1", "highcharts": "^11.4.5", "highcharts-react-official": "^3.2.1", @@ -765,62 +763,6 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, - "node_modules/@vercel/analytics": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.3.1.tgz", - "integrity": "sha512-xhSlYgAuJ6Q4WQGkzYTLmXwhYl39sWjoMA3nHxfkvG+WdBT25c563a7QhwwKivEOZtPJXifYHR1m2ihoisbWyA==", - "license": "MPL-2.0", - "dependencies": { - "server-only": "^0.0.1" - }, - "peerDependencies": { - "next": ">= 13", - "react": "^18 || ^19" - }, - "peerDependenciesMeta": { - "next": { - "optional": true - }, - "react": { - "optional": true - } - } - }, - "node_modules/@vercel/speed-insights": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@vercel/speed-insights/-/speed-insights-1.0.11.tgz", - "integrity": "sha512-l9hzSNmJvb2Yqpgd/BzpiT0J0aQDdtqxOf3Xm+iW4PICxVvhY1ef7Otdx4GXI+88dVkws57qMzXiShz19gXzSQ==", - "hasInstallScript": true, - "license": "Apache-2.0", - "peerDependencies": { - "@sveltejs/kit": "^1 || ^2", - "next": ">= 13", - "react": "^18 || ^19", - "svelte": "^4", - "vue": "^3", - "vue-router": "^4" - }, - "peerDependenciesMeta": { - "@sveltejs/kit": { - "optional": true - }, - "next": { - "optional": true - }, - "react": { - "optional": true - }, - "svelte": { - "optional": true - }, - "vue": { - "optional": true - }, - "vue-router": { - "optional": true - } - } - }, "node_modules/acorn": { "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", @@ -4286,11 +4228,6 @@ "node": ">=10" } }, - "node_modules/server-only": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz", - "integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==" - }, "node_modules/set-function-length": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 21928395..9d552d3e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,15 +12,13 @@ "@mantine/core": "^7.11.1", "@mantine/hooks": "^7.9.2", "@tabler/icons-react": "^3.8.0", - "@vercel/analytics": "^1.3.1", - "@vercel/speed-insights": "^1.0.11", "classnames": "^2.5.1", "highcharts": "^11.4.5", "highcharts-react-official": "^3.2.1", "next": "14.2.10", - "sass": "^1.79.0", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "sass": "^1.79.0" }, "devDependencies": { "@types/node": "^20", From e463eecc2c018b7d66f270bcfd810e21c8d8fbb4 Mon Sep 17 00:00:00 2001 From: Aryan Kothariset -g allow-passthrough on <87589047+thearyadev@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:16:57 -0500 Subject: [PATCH 2/2] add: posthog analytics --- frontend/app/layout.tsx | 24 ++++++++++---------- frontend/app/providers.tsx | 13 +++++++++++ frontend/package-lock.json | 46 ++++++++++++++++++++++++++++++++++++++ frontend/package.json | 1 + 4 files changed, 72 insertions(+), 12 deletions(-) create mode 100644 frontend/app/providers.tsx diff --git a/frontend/app/layout.tsx b/frontend/app/layout.tsx index 66e46f3b..0f20028f 100644 --- a/frontend/app/layout.tsx +++ b/frontend/app/layout.tsx @@ -5,9 +5,9 @@ import type { Metadata } from "next"; import { Inter } from "next/font/google"; import "./globals.scss"; import { Footer, Header, ScrollToTop } from "@/app/components"; -import { Analytics } from "@vercel/analytics/react"; -import { SpeedInsights } from "@vercel/speed-insights/next"; import Head from "next/head"; +import { IconChartBar } from "@tabler/icons-react"; +import { CSPostHogProvider } from "./providers"; const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { @@ -27,16 +27,16 @@ export default function RootLayout({ - - - - -
- {children} -