feat: add analytics (#27)

Reviewed-on: https://codeberg.org/nhcarrigan/portfolio/pulls/27
Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit is contained in:
Naomi Carrigan 2024-10-15 02:55:34 +00:00 committed by Naomi the Technomancer
parent 1801749c8f
commit 28c9921777
3 changed files with 20 additions and 0 deletions

View File

@ -14,6 +14,7 @@
"@fortawesome/free-solid-svg-icons": "6.6.0",
"@fortawesome/react-fontawesome": "0.2.2",
"next": "14.2.6",
"next-plausible": "3.12.2",
"react": "18.3.1",
"react-dom": "18.3.1"
},

16
pnpm-lock.yaml generated
View File

@ -23,6 +23,9 @@ importers:
next:
specifier: 14.2.6
version: 14.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
next-plausible:
specifier: 3.12.2
version: 3.12.2(next@14.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react:
specifier: 18.3.1
version: 18.3.1
@ -1056,6 +1059,13 @@ packages:
natural-compare@1.4.0:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
next-plausible@3.12.2:
resolution: {integrity: sha512-jyOYLAdwaZZR6nrzFhN9xfVjzYOG6mIQ/LLDCfdAS99ELy759cKfNxluGo+pI2Xh9cYxTFYYZGlnkyR3IPy4yg==}
peerDependencies:
next: ^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
next@14.2.6:
resolution: {integrity: sha512-57Su7RqXs5CBKKKOagt8gPhMM3CpjgbeQhrtei2KLAA1vTNm7jfKS+uDARkSW8ZETUflDCBIsUKGSyQdRs4U4g==}
engines: {node: '>=18.17.0'}
@ -2745,6 +2755,12 @@ snapshots:
natural-compare@1.4.0: {}
next-plausible@3.12.2(next@14.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
next: 14.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
next@14.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
'@next/env': 14.2.6

View File

@ -3,6 +3,7 @@ import { Inter } from "next/font/google";
import "./globals.css";
import { ClientNavigation } from "@/components/navigation";
import Script from "next/script";
import PlausibleProvider from "next-plausible";
const inter = Inter({ subsets: ["latin"] });
@ -27,6 +28,7 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<PlausibleProvider domain="nhcarrigan.com" customDomain="analytics.nhcarrigan.com" trackFileDownloads={true} trackOutboundLinks={true}>
<link rel="icon" href="https://cdn.nhcarrigan.com/logo.png" sizes="any" />
<body className={inter.className}>
<header>
@ -50,6 +52,7 @@ export default function RootLayout({
defer
src="//js.hs-scripts.com/47086586.js"
></Script>
</PlausibleProvider>
</html>
);
}