🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Add DemoSignupBanner to Header component for enhanced user engagement
Bill Yang395849130165
diff --git a/client/src/app/[site]/components/Header/DemoSignupBanner.tsx b/client/src/app/[site]/components/Header/DemoSignupBanner.tsxnew file mode 100644index 000000000..7909f21d6--- /dev/null+++ b/client/src/app/[site]/components/Header/DemoSignupBanner.tsx@@ -0,0 +1,31 @@+"use client";++import { ArrowRight, Sparkles } from "lucide-react";+import Link from "next/link";+import { Button } from "../../../../components/ui/button";++export function DemoSignupBanner() {+ // Only show on demo.rybbit.io and not in an iframe+ if (typeof window === "undefined" || window.location.host !== "demo.rybbit.io") {+ return null;+ }++ // Don't show if in an iframe+ if (window.self !== window.top) {+ return null;+ }++ return (+ <div className="mt-4 px-4 py-3 rounded-lg border border-purple-100 dark:border-purple-400/30 bg-purple-50/80 dark:bg-purple-900/20 text-sm flex gap-4 items-center">+ <div className="text-purple-700 dark:text-purple-300 flex items-center font-medium">+ <Sparkles className="mr-2 h-4 w-4" />+ <span>Enjoying the demo? Get started with your own analytics dashboard!</span>+ </div>+ <Button variant="success" size="sm" asChild>+ <Link href="https://app.rybbit.io/signup" target="_blank" rel="noopener">+ Sign Up <ArrowRight className="ml-1 h-3 w-3" />+ </Link>+ </Button>+ </div>+ );+}diff --git a/client/src/app/[site]/components/Header/Header.tsx b/client/src/app/[site]/components/Header/Header.tsxindex 50a936aa1..b62262330 100644--- a/client/src/app/[site]/components/Header/Header.tsx+++ b/client/src/app/[site]/components/Header/Header.tsx@@ -2,6 +2,7 @@import { FreePlanBanner } from "../../../../components/FreePlanBanner";import { userStore } from "../../../../lib/userStore";+import { DemoSignupBanner } from "./DemoSignupBanner";import { NoData } from "./NoData";import { UsageBanners } from "./UsageBanners";@@ -12,6 +13,7 @@ export function Header() {<div className="flex flex-col">{user && (<div className="flex flex-col px-2 md:px-4">+ <DemoSignupBanner /><FreePlanBanner /><UsageBanners /><NoData />