From e25146a220cf98f6de397d9aabcb1ebc41ef8034 Mon Sep 17 00:00:00 2001 From: Nikita Agarwal Date: Thu, 28 Aug 2025 11:08:24 +0530 Subject: [PATCH] add tracking to landing page --- docs/docs/exosphere/state-manager-setup.md | 2 +- landing-page/src/app/layout.tsx | 2 ++ landing-page/src/components/RB2BLoader.tsx | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 landing-page/src/components/RB2BLoader.tsx diff --git a/docs/docs/exosphere/state-manager-setup.md b/docs/docs/exosphere/state-manager-setup.md index df58e898..9965afb1 100644 --- a/docs/docs/exosphere/state-manager-setup.md +++ b/docs/docs/exosphere/state-manager-setup.md @@ -27,7 +27,7 @@ The Exosphere state manager is the core backend service that handles workflow ex -e MONGO_DATABASE_NAME="your-database-name" \ -e STATE_MANAGER_SECRET="your-secret-key" \ -e SECRETS_ENCRYPTION_KEY="your-base64-encoded-encryption-key" \ - ghcr.io/exospherehost/state-manager:latest + ghcr.io/exospherehost/exosphere-state-manager:latest ``` 2. **Verify the service is running**: diff --git a/landing-page/src/app/layout.tsx b/landing-page/src/app/layout.tsx index 5b9336b7..2adbbc3e 100644 --- a/landing-page/src/app/layout.tsx +++ b/landing-page/src/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata } from "next"; import { darkerGrotesque, pattanakarn } from '../lib/fonts'; import "./globals.css"; import { GoogleAnalytics } from '@next/third-parties/google' +import RB2BLoader from '../components/RB2BLoader'; export const metadata: Metadata = { title: "Exosphere | Async AI Workflows at Scale", @@ -73,6 +74,7 @@ export default function RootLayout({ > {children} + ); diff --git a/landing-page/src/components/RB2BLoader.tsx b/landing-page/src/components/RB2BLoader.tsx new file mode 100644 index 00000000..a142a53d --- /dev/null +++ b/landing-page/src/components/RB2BLoader.tsx @@ -0,0 +1,21 @@ +'use client'; + +import { usePathname } from 'next/navigation'; +import { useEffect } from 'react'; + +export default function RB2BLoader() { + const pathname = usePathname(); + + useEffect(() => { + const existing = document.getElementById('rb2b-script'); + if (existing) existing.remove(); + + const script = document.createElement('script'); + script.id = 'rb2b-script'; + script.src = `https://ddwl4m2hdecbv.cloudfront.net/b/${process.env.NEXT_PUBLIC_RB2B_ID}/${process.env.NEXT_PUBLIC_RB2B_ID}.js.gz`; + script.async = true; + document.body.appendChild(script); + }, [pathname]); + + return null; +}