From 65b755aa930fa5efc84fb386e48813f7983fd847 Mon Sep 17 00:00:00 2001
From: Claude
Date: Fri, 31 Oct 2025 15:53:41 +0000
Subject: [PATCH] Integrate Tally waitlist form into landing page
- Replace all "Get Started" and "Create Your Plan" CTAs with "Join Waitlist"
- Add Tally widget embed script (w56Pp6) that opens as popup
- Remove old email form and waitlist signup logic
- Keep analytics tracking with trackEvent
- Maintain all existing styling and "Learn More" button
---
frontend/app/page.tsx | 107 ++++++++++++++++++------------------------
1 file changed, 45 insertions(+), 62 deletions(-)
diff --git a/frontend/app/page.tsx b/frontend/app/page.tsx
index d6deb11..e603d74 100644
--- a/frontend/app/page.tsx
+++ b/frontend/app/page.tsx
@@ -1,32 +1,34 @@
'use client';
import Link from 'next/link';
-import { useState } from 'react';
-import { joinWaitlist, trackEvent } from '@/lib/api';
+import { useEffect } from 'react';
+import { trackEvent } from '@/lib/api';
-export default function Home() {
- const [email, setEmail] = useState('');
- const [loading, setLoading] = useState(false);
- const [submitted, setSubmitted] = useState(false);
- const [error, setError] = useState('');
-
- const handleWaitlistSignup = async (e: React.FormEvent) => {
- e.preventDefault();
- setLoading(true);
- setError('');
-
- const result = await joinWaitlist({
- email,
- source: 'landing_page',
- });
+// Declare Tally types for TypeScript
+declare global {
+ interface Window {
+ Tally?: {
+ openPopup: (formId: string, options?: { width?: number }) => void;
+ };
+ }
+}
- setLoading(false);
+export default function Home() {
+ // Load Tally widget script
+ useEffect(() => {
+ const script = document.createElement('script');
+ script.src = 'https://tally.so/widgets/embed.js';
+ script.async = true;
+ document.body.appendChild(script);
+ return () => {
+ document.body.removeChild(script);
+ };
+ }, []);
- if (result.success) {
- setSubmitted(true);
- trackEvent('landing_page_waitlist_signup');
- } else {
- setError(result.error?.message || 'Failed to join waitlist');
+ const openWaitlist = () => {
+ trackEvent('waitlist_opened');
+ if (window.Tally) {
+ window.Tally.openPopup('w56Pp6', { width: 600 });
}
};
@@ -36,12 +38,12 @@ export default function Home() {
@@ -57,13 +59,12 @@ export default function Home() {
tailored to your goals, schedule, and fitness level in minutes.
@@ -257,9 +237,12 @@ export default function Home() {
© 2025 Unweighted. Built for people who want real results.
-
- Create Your Plan
-
+