mirror of
https://github.com/ClipFusion-org/clipfusion.git
synced 2025-08-05 18:15:08 +00:00
integrated umami analytics
This commit is contained in:
parent
773c306cd7
commit
edeff02256
12
src/app/analytics.tsx
Normal file
12
src/app/analytics.tsx
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { ReactNode } from "react";
|
||||||
|
|
||||||
|
// Powered by Umami (https://umami.is/)
|
||||||
|
export default function Analytics(): ReactNode {
|
||||||
|
if (process.env.NODE_ENV == "development") {
|
||||||
|
console.log("Analytics is disabled in development mode");
|
||||||
|
return (<></>);
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<script defer src={process.env.ANALYTICS_SCRIPT} data-website-id={process.env.ANALYTICS_WEBSITE_ID}/>
|
||||||
|
)
|
||||||
|
}
|
@ -5,6 +5,7 @@ import { SidebarProvider } from "@/components/ui/sidebar";
|
|||||||
import Dashboard from "@/components/dashboard";
|
import Dashboard from "@/components/dashboard";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import ThemeProvider from "./theme-provider";
|
import ThemeProvider from "./theme-provider";
|
||||||
|
import Analytics from "./analytics";
|
||||||
|
|
||||||
const geist = Geist({
|
const geist = Geist({
|
||||||
variable: "--font-geist",
|
variable: "--font-geist",
|
||||||
@ -29,7 +30,9 @@ export default function RootLayout({
|
|||||||
}>) {
|
}>) {
|
||||||
return (
|
return (
|
||||||
<html lang="en" suppressHydrationWarning>
|
<html lang="en" suppressHydrationWarning>
|
||||||
<head/>
|
<head>
|
||||||
|
<Analytics/>
|
||||||
|
</head>
|
||||||
<body className={`${geist.variable} ${geistMono.variable} antialiased`}>
|
<body className={`${geist.variable} ${geistMono.variable} antialiased`}>
|
||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
<SidebarProvider>
|
<SidebarProvider>
|
||||||
|
Loading…
Reference in New Issue
Block a user