Add Umami analytics tracking for key user interactions

Integrates Umami analytics with production-only tracking script and event tracking for user login and location creation actions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-11-26 20:55:05 +01:00
parent 86d3587fb7
commit d898f79ba3
3 changed files with 10 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import '@/app/ui/global.css';
import { inter } from '@/app/ui/fonts';
import { Metadata } from 'next';
import Script from 'next/script';
export const metadata:Metadata = {
alternates: {
@@ -43,6 +44,13 @@ export default function RootLayout({
}) {
return (
<html lang={locale}>
{process.env.NODE_ENV === 'production' && (
<Script
src="https://umami.rezije.app/script.js"
data-website-id="fcd97697-de4b-4a36-b40a-ddb22761cd06"
strategy="afterInteractive"
/>
)}
<body className={`${inter.className} antialiased`}>{children}</body>
</html>
);