1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-14 23:20:51 -05:00

vercel analytics ➡️ umami

This commit is contained in:
2025-03-11 14:28:29 -04:00
parent fa54a4f978
commit 125a6932c2
17 changed files with 151 additions and 170 deletions

18
app/analytics.tsx Normal file
View File

@@ -0,0 +1,18 @@
import Script from "next/script";
const Analytics = () => {
if (!process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID || process.env.NEXT_PUBLIC_VERCEL_ENV !== "production") {
return null;
}
return (
<Script
src="/_stream/u/script.js" // see next.config.ts rewrite
strategy="afterInteractive"
data-website-id={process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID}
data-domains={process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}
/>
);
};
export default Analytics;