diff --git a/apps/web/app/(app)/layout.tsx b/apps/web/app/(app)/layout.tsx index 4ad8e2151..542c0a65d 100644 --- a/apps/web/app/(app)/layout.tsx +++ b/apps/web/app/(app)/layout.tsx @@ -2,12 +2,14 @@ import { EnsureWorkspace } from "@/components/ensure-workspace" import { MobileBanner } from "@/components/mobile-banner" +import { NextAppResearchCta } from "@/components/next-app-research-cta" export default function AppLayout({ children }: { children: React.ReactNode }) { return ( <> {children} + ) } diff --git a/apps/web/components/next-app-research-cta.tsx b/apps/web/components/next-app-research-cta.tsx new file mode 100644 index 000000000..727cb2003 --- /dev/null +++ b/apps/web/components/next-app-research-cta.tsx @@ -0,0 +1,144 @@ +"use client" + +import { useCallback, useEffect, useState } from "react" +import { usePathname } from "next/navigation" +import { Phone, Users, X as XIcon } from "lucide-react" +import { cn } from "@lib/utils" +import { dmSans125ClassName } from "@/lib/fonts" +import { analytics } from "@/lib/analytics" + +const STORAGE_KEY = "sm_next_app_research_cta_dismissed_v1" + +const BOOK_CALL_HREF = "https://cal.com/supermemory/growth" + +function ResearchCtaHeroGraphic() { + return ( +
+
+
+
+
+
+
+ + + × + + +
+
+ ) +} + +export function NextAppResearchCta() { + const pathname = usePathname() + const [mounted, setMounted] = useState(false) + const [dismissed, setDismissed] = useState(false) + + useEffect(() => { + setMounted(true) + setDismissed(localStorage.getItem(STORAGE_KEY) === "1") + }, []) + + const handleDismiss = useCallback(() => { + localStorage.setItem(STORAGE_KEY, "1") + setDismissed(true) + analytics.nextAppResearchCtaDismissed() + }, []) + + const handleBookClick = useCallback(() => { + analytics.nextAppResearchCtaBookCallClicked() + }, []) + + if (!mounted || dismissed || pathname.startsWith("/onboarding")) { + return null + } + + return ( +
+
+ +
+
+

+ Be part of the next supermemory app +

+ +
+

+ Share what you want next—we’d love a quick call. +

+ +
+
+
+ ) +} diff --git a/apps/web/lib/analytics.ts b/apps/web/lib/analytics.ts index 71fad27f4..0799de5fc 100644 --- a/apps/web/lib/analytics.ts +++ b/apps/web/lib/analytics.ts @@ -46,6 +46,11 @@ export const analytics = { connectionAuthCompleted: () => safeCapture("connection_auth_completed"), connectionAuthFailed: () => safeCapture("connection_auth_failed"), + nextAppResearchCtaDismissed: () => + safeCapture("next_app_research_cta_dismissed"), + nextAppResearchCtaBookCallClicked: () => + safeCapture("next_app_research_cta_book_call_clicked"), + mcpViewOpened: () => safeCapture("mcp_view_opened"), mcpInstallCmdCopied: () => safeCapture("mcp_install_cmd_copied"),