Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Script test (#256)

Bill Yangfde8558ce7e0
diff --git a/client/src/app/layout.tsx b/client/src/app/layout.tsx
index 3cc8aa08c..77d7f960a 100644
--- a/client/src/app/layout.tsx
+++ b/client/src/app/layout.tsx
@@ -10,13 +10,10 @@ import { TooltipProvider } from "../components/ui/tooltip";
import { userStore } from "../lib/userStore";
import { cn } from "../lib/utils";
import "./globals.css";
+import Script from "next/script";
const inter = Inter({ subsets: ["latin"] });
-// const manrope = Manrope({
-// subsets: ["latin"],
-// });
-
const publicRoutes = ["/login", "/signup"];
// Helper function to check if a site is public
@@ -86,12 +83,22 @@ export default function RootLayout({
<html lang="en" className="dark">
<TooltipProvider>
<body
- className={cn("bg-background text-foreground h-full", inter.className)}
+ className={cn(
+ "bg-background text-foreground h-full",
+ inter.className
+ )}
>
<QueryProvider>{children}</QueryProvider>
<Toaster />
</body>
</TooltipProvider>
+ {globalThis?.location?.hostname === "app.rybbit.io" && (
+ <Script
+ src="https://app.rybbit.io/api/script.js"
+ data-site-id="349"
+ strategy="afterInteractive"
+ />
+ )}
</html>
);
}