Skip to content

Commit ceebcc2

Browse files
authored
Merge pull request #40 from NillionNetwork/chore/fixes
chore/fixes
2 parents 83282d7 + 3e6faa8 commit ceebcc2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/app/app/page.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { v4 as uuidv4 } from "uuid";
66
import StreamingChatArea from "@/components/chat/StreamingChatArea";
77
import { useApp } from "@/contexts/AppContext";
88
import { useAuth } from "@/contexts/UnifiedAuthProvider";
9+
import { captureAndStoreUTMParameters } from "@/utils/utmTracking";
910

1011
export default function HomePage() {
1112
const [loading, setLoading] = useState(true);
@@ -14,6 +15,14 @@ export default function HomePage() {
1415
const { selectedPersona } = useApp();
1516
const { user } = useAuth();
1617

18+
// Capture UTM parameters when landing on app page (e.g., from email confirmation)
19+
useEffect(() => {
20+
const utmParams = captureAndStoreUTMParameters();
21+
if (Object.keys(utmParams).length > 0) {
22+
console.log("UTM parameters captured on app page:", utmParams);
23+
}
24+
}, []);
25+
1726
useEffect(() => {
1827
if (!user?.isAuthenticated || !user?.id) {
1928
setLoading(false);

0 commit comments

Comments
 (0)