Skip to content

Commit 8c6e75e

Browse files
committed
feat: analytics
1 parent 3425f7d commit 8c6e75e

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

app/template.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Image from "next/image";
55
import mikanLogo from "./assets/mikandev-circle.webp";
66
import MikanCat from "./assets/mikan-cat.png";
77
import { useRouter, usePathname } from "next/navigation";
8+
import { useSwetrix } from '@swetrix/nextjs'
89
import CookieConsent from "react-cookie-consent";
910

1011
import { FaDiscord, FaGithub, FaTwitter, FaYoutube } from "react-icons/fa";
@@ -16,6 +17,10 @@ export default function RootLayout({
1617
const router = useRouter();
1718
const pathname = usePathname();
1819

20+
useSwetrix("VEi3stPi8aiv", {
21+
apiURL: 'https://analytics.mikandev.tech/log',
22+
})
23+
1924
const changeLanguage = () => {
2025
//@ts-ignore
2126
const pathSegments = pathname.split("/");

bun.lockb

1.13 KB
Binary file not shown.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@polar-sh/checkout": "^0.1.8",
2020
"@polar-sh/nextjs": "^0.3.15",
2121
"@polar-sh/sdk": "^0.22.1",
22+
"@swetrix/nextjs": "^1.0.1",
2223
"@types/shade-blend-color": "^1.0.3",
2324
"accept-language": "^3.0.18",
2425
"clsx": "^2.1.0",

0 commit comments

Comments
 (0)