Add Umami analytics script to the flasher layout.

Load tracking after interactive so production visits are counted without blocking first paint.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-19 21:56:16 +08:00
parent 2020f586d9
commit 8ae9501263
2 changed files with 9 additions and 0 deletions

3
.gitignore vendored
View File

@@ -41,6 +41,9 @@ yarn-error.log*
/firmware/**
!/firmware/.gitkeep
# local deploy helpers (may contain secrets / one-shots)
scripts/_*.py
# vercel
.vercel

View File

@@ -1,5 +1,6 @@
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import Script from "next/script";
import { NextIntlClientProvider, hasLocale } from "next-intl";
import { getMessages, getTranslations, setRequestLocale } from "next-intl/server";
import { DM_Sans, Syne } from "next/font/google";
@@ -76,6 +77,11 @@ export default async function LocaleLayout({ children, params }: Props) {
return (
<html lang={locale} className={`${dmSans.variable} ${syne.variable}`}>
<body className="antialiased">
<Script
src="https://umami.dsx2020.com/script.js"
data-website-id="477bc497-9718-4b81-bc02-1fa539eb12e3"
strategy="afterInteractive"
/>
<NextIntlClientProvider messages={messages}>
<div className="bg-grid" aria-hidden />
<div className="bg-glow" aria-hidden />