Skip to content

Commit b3bb84c

Browse files
authored
Merge pull request #2 from thedevdavid/develop
feat: added Vercel analytics
2 parents 82da269 + b6650ee commit b3bb84c

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ You can change the metadata in `utils/metadata.ts`. This will be used around the
8282

8383
### Analytics
8484

85-
_WIP_ as I'm still deciding which analytics tools to support. Feel free to open an issue if you have any suggestions or a PR if you want to implement it yourself.
85+
Vercel analytics is added. To configure, you need to enable it on [Vercel project dashboard](https://vercel.com/dashboard) by selecting your Project and then click the Analytics tab and click Enable from the dialog.
86+
87+
Supporting other analytics providers are planned. Feel free to open an issue if you have any suggestions or a PR if you want to implement it yourself.
8688

8789
### Newsletter subscription
8890

@@ -126,18 +128,19 @@ Create a PR and add your digital garden to this list if you're using the templat
126128
- [x] OG image generation
127129
- [x] projects page
128130
- [x] about section on homepage
131+
- [x] search & command bar
132+
- [x] Vercel analytics (fathom, simplelytics, vercel)
129133
- [ ] Design improvements (whitespace, layout, etc.)
130134
- [ ] `manifest.json`
131-
- [ ] search & command bar
132135
- [ ] newsletter integration
133136
- [ ] Post series
134137
- [ ] Hidden content (behind email subscription)
135138
- [ ] 100 lighthouse score
136139
- [ ] Command bar fuzzy search in content
137140
- [ ] Pagination
138141
- [ ] SEO improvements
139-
- [ ] analytics (fathom, simplelytics, vercel)
140142
- [ ] Accessibility audit
143+
- [ ] Other analytics providers (fathom, simplelytics, etc.)
141144
- [ ] TypeScript fixes
142145
- [ ] Redesign uses page
143146
- [ ] Redesign projects page

app/layout.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import "./globals.css";
22

33
import { Inter, Space_Grotesk } from "next/font/google";
4+
import { Analytics } from "@vercel/analytics/react";
45

56
import siteMetadata from "@/lib/metadata";
67
import { Toaster } from "@/components/ui/toaster";
@@ -32,6 +33,8 @@ export default function RootLayout({ children }: RootLayoutProps) {
3233
<Toaster />
3334
</ThemeProvider>
3435
</body>
36+
37+
<Analytics />
3538
</html>
3639
);
3740
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "digital-garden",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"private": true,
55
"repository": "https://github.com/thedevdavid/digital-garden",
66
"author": {
@@ -29,6 +29,7 @@
2929
"@radix-ui/react-slot": "1.0.2",
3030
"@radix-ui/react-toast": "1.1.4",
3131
"@radix-ui/react-tooltip": "1.0.6",
32+
"@vercel/analytics": "1.0.1",
3233
"bright": "0.8.2",
3334
"class-variance-authority": "0.6.0",
3435
"clsx": "1.2.1",

pnpm-lock.yaml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)