From f503271291570f570c59e6c8ba245ac9d9e7cade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Thune?= Date: Mon, 28 Aug 2023 08:49:01 +0200 Subject: [PATCH] chore: Added web analytics to the storefront (#759) --- storefront/package.json | 1 + storefront/pages/_app.tsx | 2 ++ yarn.lock | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/storefront/package.json b/storefront/package.json index 2cdca501f7..2f4b5053b4 100644 --- a/storefront/package.json +++ b/storefront/package.json @@ -23,6 +23,7 @@ "@types/react": "18.0.26", "@types/react-dom": "18.0.9", "@types/react-syntax-highlighter": "^15.5.6", + "@vercel/analytics": "^1.0.2", "classnames": "^2.3.2", "directory-tree": "^3.5.1", "gray-matter": "^4.0.3", diff --git a/storefront/pages/_app.tsx b/storefront/pages/_app.tsx index 2d7762062b..74bdacffdc 100644 --- a/storefront/pages/_app.tsx +++ b/storefront/pages/_app.tsx @@ -8,6 +8,7 @@ import { Inter } from '@next/font/google'; import type { AppProps } from 'next/app'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import cn from 'classnames'; +import { Analytics } from '@vercel/analytics/react'; import { Header } from '../components/Header/Header'; import { Footer } from '../components/Footer/Footer'; @@ -30,6 +31,7 @@ const MyApp = ({ Component, pageProps }: AppProps) => {