Skip to content

Commit

Permalink
📈 Add vercel analytics.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieutu committed May 9, 2024
1 parent 03de25d commit c072b79
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@react-leaflet/core": "^2.0.1",
"@tailwindcss/line-clamp": "^0.4.0",
"@types/leaflet.markercluster": "^1.5.1",
"@vercel/analytics": "^1.2.2",
"algoliasearch": "^4.14.2",
"axios": "^0.27.2",
"classnames": "^2.3.1",
Expand Down
2 changes: 2 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import '../assets/styles.css'

import { AppProps } from 'next/app'
import { DefaultSeo } from 'next-seo'
import { Analytics } from '@vercel/analytics/react'

Check failure on line 5 in src/pages/_app.tsx

View workflow job for this annotation

GitHub Actions / checks

Unable to resolve path to module '@vercel/analytics/react'
import { PreviewAlert } from '../components/PreviewAlert'

const MyApp = ({ Component, pageProps }: AppProps) => (
Expand All @@ -28,6 +29,7 @@ const MyApp = ({ Component, pageProps }: AppProps) => (
/>
{pageProps.preview && <PreviewAlert />}
<Component {...pageProps} />
<Analytics />
</>
)

Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,13 @@
"@typescript-eslint/types" "5.36.1"
eslint-visitor-keys "^3.3.0"

"@vercel/analytics@^1.2.2":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@vercel/analytics/-/analytics-1.2.2.tgz#715d8f203a170c06ba36b363e03b048c03060d5d"
integrity sha512-X0rctVWkQV1e5Y300ehVNqpOfSOufo7ieA5PIdna8yX/U7Vjz0GFsGf4qvAhxV02uQ2CVt7GYcrFfddXXK2Y4A==
dependencies:
server-only "^0.0.1"

abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
Expand Down Expand Up @@ -5309,6 +5316,11 @@ semver@^7.3.7:
dependencies:
lru-cache "^6.0.0"

server-only@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/server-only/-/server-only-0.0.1.tgz#0f366bb6afb618c37c9255a314535dc412cd1c9e"
integrity sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==

set-blocking@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
Expand Down

0 comments on commit c072b79

Please sign in to comment.