Skip to content

Commit b6c4f7d

Browse files
committed
Adding vercel analytics
1 parent 1b032ba commit b6c4f7d

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

app/layout.js

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Inter } from "next/font/google";
22
import "./globals.css";
33
import { GameContextWrapper } from "@/components/GameContextWrapper";
44
import { GoogleAnalytics } from "@next/third-parties/google";
5+
import { Analytics } from "@vercel/analytics/react";
56

67
const GOOGLE_ANALYTICS_ID = process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID;
78
const inter = Inter({ subsets: ["latin"] });
@@ -20,6 +21,7 @@ export default function RootLayout({ children }) {
2021
<GameContextWrapper>
2122
<div className="max-w-lg mx-auto">{children}</div>
2223
</GameContextWrapper>
24+
<Analytics />
2325
</body>
2426
<GoogleAnalytics gaId={GOOGLE_ANALYTICS_ID} />
2527
</html>

package-lock.json

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

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@next/third-parties": "^14.1.0",
13+
"@vercel/analytics": "^1.4.1",
1314
"next": "14.1.0",
1415
"react": "^18",
1516
"react-dom": "^18"
@@ -18,8 +19,8 @@
1819
"autoprefixer": "^10.0.1",
1920
"eslint": "^8",
2021
"eslint-config-next": "14.1.0",
22+
"firebase": "^10.8.0",
2123
"postcss": "^8",
22-
"tailwindcss": "^3.3.0",
23-
"firebase": "^10.8.0"
24+
"tailwindcss": "^3.3.0"
2425
}
2526
}

0 commit comments

Comments
 (0)