Skip to content

Commit ea27c89

Browse files
authored
add tracking to landing page (#309)
1 parent 54e8164 commit ea27c89

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

docs/docs/exosphere/state-manager-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The Exosphere state manager is the core backend service that handles workflow ex
2727
-e MONGO_DATABASE_NAME="your-database-name" \
2828
-e STATE_MANAGER_SECRET="your-secret-key" \
2929
-e SECRETS_ENCRYPTION_KEY="your-base64-encoded-encryption-key" \
30-
ghcr.io/exospherehost/state-manager:latest
30+
ghcr.io/exospherehost/exosphere-state-manager:latest
3131
```
3232

3333
2. **Verify the service is running**:

landing-page/src/app/layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
22
import { darkerGrotesque, pattanakarn } from '../lib/fonts';
33
import "./globals.css";
44
import { GoogleAnalytics } from '@next/third-parties/google'
5+
import RB2BLoader from '../components/RB2BLoader';
56

67
export const metadata: Metadata = {
78
title: "Exosphere | Async AI Workflows at Scale",
@@ -73,6 +74,7 @@ export default function RootLayout({
7374
>
7475
{children}
7576
<GoogleAnalytics gaId="G-XY9H2PN0ZX" />
77+
<RB2BLoader />
7678
</body>
7779
</html>
7880
);
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'use client';
2+
3+
import { usePathname } from 'next/navigation';
4+
import { useEffect } from 'react';
5+
6+
export default function RB2BLoader() {
7+
const pathname = usePathname();
8+
9+
useEffect(() => {
10+
const existing = document.getElementById('rb2b-script');
11+
if (existing) existing.remove();
12+
13+
const script = document.createElement('script');
14+
script.id = 'rb2b-script';
15+
script.src = `https://ddwl4m2hdecbv.cloudfront.net/b/${process.env.NEXT_PUBLIC_RB2B_ID}/${process.env.NEXT_PUBLIC_RB2B_ID}.js.gz`;
16+
script.async = true;
17+
document.body.appendChild(script);
18+
}, [pathname]);
19+
20+
return null;
21+
}

0 commit comments

Comments
 (0)