Assess Your Company Join Our Platform Waitlist Demo Enterprise Products
83% of HR leaders say their performance systems need an overhaul

Is Your Performance System
Costing You Top Talent?

Get an objective Performance Grade (A–F) in 10 minutes.
We evaluate your system design—not employee sentiment.

Get Your Free Grade →
Objective system audits—not engagement surveys

Culture Doesn't Shift
Until Systems Change

We audit how decisions actually get made—how goals are set, feedback is given, and performance drives outcomes.
Independent certification that operates from first principles and satisfies boards and institutional investors.

`; document .getElementById("betaSignupForm") .addEventListener("submit", async function (event) { event.preventDefault(); const name = document .getElementById("beta-signup-name") .value.trim(); const email = document .getElementById("beta-signup-email") .value.trim(); const company = document .getElementById("beta-signup-company") .value.trim(); if (!name || !email) { alert("Please fill in all required fields."); return; } const submitBtn = event.target.querySelector(".submit-button"); const originalText = submitBtn ? submitBtn.textContent : ""; if (submitBtn) { submitBtn.disabled = true; submitBtn.textContent = "Submitting..."; } // Turnstile token (if Turnstile widget is enabled below) let turnstileToken = ""; try { if (window.turnstile && typeof window.turnstile.getResponse === "function") { turnstileToken = window.turnstile.getResponse() || ""; } } catch (e) { /* optional */ } try { const response = await fetch("/.netlify/functions/start-signup", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ fullName: name, email: email, organization: company || "Not provided", source: "landing_modal", screenResolution: window.screen ? window.screen.width + "x" + window.screen.height : "unknown", turnstileToken: turnstileToken, }), }); const result = await response.json().catch(() => ({})); if (!response.ok || !result.success) { throw new Error(result.error || "Signup failed. Please try again."); } // Replace modal contents with the next-step message. const modalRoot = document.getElementById("betaAccessModal"); if (modalRoot) { const modalContent = modalRoot.querySelector(".modal"); const headline = result.path === "consumer" ? "Check your inbox" : "Request received"; const bodyMsg = result.message || (result.path === "consumer" ? "We emailed you a verification link. It expires in 15 minutes." : "We'll review your request and email you within 24 hours."); modalContent.innerHTML = '' + '' + ''; } } catch (err) { console.error("Signup error:", err); alert(err.message || "Something went wrong. Please try again."); if (submitBtn) { submitBtn.disabled = false; submitBtn.textContent = originalText; } } }); } function closeBetaAccessModal() { const modal = document.getElementById("betaAccessModal"); if (modal) { document.body.removeChild(modal); document.body.style.overflow = "auto"; } } function openContactModal() { closeBetaAccessModal(); alert( "Contact functionality would go here. Please use the demo form for now." ); } // Demo Form Handler document .getElementById("demoForm") .addEventListener("submit", async function (event) { event.preventDefault(); const name = document.getElementById("demo-name").value.trim(); const email = document.getElementById("demo-email").value.trim(); const company = document.getElementById("demo-company").value.trim(); const size = document.getElementById("demo-size").value; const challenges = document .getElementById("demo-challenges") .value.trim(); const submitBtn = event.target.querySelector(".form-submit"); const originalText = submitBtn.textContent; submitBtn.textContent = "Scheduling..."; submitBtn.disabled = true; try { // Store in Firebase using secure service let dbSuccess = false; try { // Use the secure waitlist service for demo requests if (!window.waitlistService) { throw new Error("Demo request service not available"); } const result = await window.waitlistService.submitDemoRequest({ name, email, company, organizationSize: size, challenges, }); if (result.success) { dbSuccess = true; } else { throw new Error( result.message || "Failed to submit demo request" ); } } catch (dbError) { console.error("Demo request submission error:", dbError); // Firebase storage failed, will try email fallback dbSuccess = false; } // Try to send emails, but don't fail if this doesn't work let emailSuccess = false; try { // Send admin notification email to Greg const adminEmailParams = { to_email: "greg@performance.fyi", from_name: name, subject: "New Demo Request - Performance.FYI", message: `Demo Request Details: Name: ${name} Email: ${email} Company: ${company || "Not provided"} Organization Size: ${size || "Not specified"} Challenges: ${challenges} Timestamp: ${new Date().toLocaleString()} This is an automated message from Performance.FYI demo request form.`, reply_to: email, }; const adminResult = await emailjs.send( EMAILJS_SERVICE_ID, EMAILJS_TEMPLATE_ID_DEMO, adminEmailParams ); // Send user confirmation email const userEmailParams = { to_email: email, from_name: "Performance.FYI Team", subject: "Demo Request Received - Performance.FYI", message: `Hi ${name}, Thank you for your interest in Performance.FYI! We've received your demo request and will be in touch within 24 hours to schedule a personalized demonstration of our platform. Your request details: - Company: ${company || "Not provided"} - Organization Size: ${size || "Not specified"} - Challenges: ${challenges} In the meantime, feel free to explore our resources or reach out with any questions at greg@performance.fyi. Best regards, Performance.FYI Team`, reply_to: "greg@performance.fyi", }; const userResult = await emailjs.send( EMAILJS_SERVICE_ID, EMAILJS_TEMPLATE_ID_DEMO, userEmailParams ); emailSuccess = true; } catch (emailError) { // Email sending failed (non-critical) } // Show success message if at least one method worked if (dbSuccess || emailSuccess) { alert( "Thank you! Your demo request has been submitted successfully. We'll be in touch soon." ); closeDemoModal(); document.getElementById("demoForm").reset(); } else { // Fallback: store in localStorage as backup const fallbackData = { name, email, company: company || "", organizationSize: size || "", challenges, timestamp: new Date().toISOString(), status: "pending_fallback", }; try { const existing = JSON.parse( localStorage.getItem("fallback_demo_requests") || "[]" ); existing.push(fallbackData); localStorage.setItem( "fallback_demo_requests", JSON.stringify(existing) ); alert( "Your demo request has been saved locally. Please contact us directly at greg@performance.fyi to ensure we received your request." ); closeDemoModal(); document.getElementById("demoForm").reset(); } catch (localStorageError) { throw new Error("All submission methods failed"); } } } catch (error) { console.error("Error submitting demo request:", error); alert( "There was an error submitting your request. Please try again or contact us directly at greg@performance.fyi." ); } finally { submitBtn.textContent = originalText; submitBtn.disabled = false; } }); // Waitlist Form Handler document .getElementById("waitlistForm") .addEventListener("submit", async function (event) { event.preventDefault(); const name = document.getElementById("waitlist-name").value.trim(); const email = document.getElementById("waitlist-email").value.trim(); const company = document .getElementById("waitlist-company") .value.trim(); const submitBtn = event.target.querySelector(".form-submit"); const originalText = submitBtn.textContent; submitBtn.textContent = "Joining..."; submitBtn.disabled = true; try { // Use the secure waitlist service if (!window.waitlistService) { throw new Error("Waitlist service not available"); } const result = await window.waitlistService.submitWaitlistEntry({ name, email, company, }); if (result.success) { alert( "Thank you! You've been added to our waitlist. We'll notify you when new features are available." ); closeWaitlistModal(); document.getElementById("waitlistForm").reset(); } else { throw new Error(result.message || "Failed to join waitlist"); } } catch (error) { console.error("Waitlist submission error:", error); alert( error.message || "There was an error joining the waitlist. Please try again or contact us directly." ); } finally { submitBtn.textContent = originalText; submitBtn.disabled = false; } }); // Close modal when clicking outside document .getElementById("demoModal") .addEventListener("click", function (event) { if (event.target === this) { closeDemoModal(); } }); document .getElementById("waitlistModal") .addEventListener("click", function (event) { if (event.target === this) { closeWaitlistModal(); } }); // Video fallback for first hero (function () { const hero = document.querySelector(".hero"); const vid = document.querySelector(".hero .hero-video"); function enableFallback() { hero.classList.add("fallback"); const poster = vid.getAttribute("poster"); if (poster) hero.style.backgroundImage = "url(" + poster + ")"; vid.style.display = "none"; } vid.addEventListener("error", enableFallback); setTimeout(() => { if (vid.readyState < 2) enableFallback(); }, 5000); })(); // Video fallback for second hero (function () { const hero = document.querySelector(".hero-section-2"); const vid = document.querySelector(".hero-section-2 .hero-video"); function enableFallback() { hero.classList.add("fallback"); const poster = vid.getAttribute("poster"); if (poster) hero.style.backgroundImage = "url(" + poster + ")"; vid.style.display = "none"; } vid.addEventListener("error", enableFallback); setTimeout(() => { if (vid.readyState < 2) enableFallback(); }, 5000); })(); // Header scroll effect window.addEventListener("scroll", function () { const header = document.querySelector(".header"); if (window.scrollY > 100) { header.style.background = "rgba(255, 255, 255, 0.98)"; } else { header.style.background = "rgba(255, 255, 255, 0.95)"; } }); // Test EmailJS function for debugging async function testEmailJS() { try { if (typeof emailjs === "undefined") { throw new Error("EmailJS not loaded"); } const testParams = { to_email: "greg@performance.fyi", from_name: "Test User", subject: "Test Email from Performance.FYI Demo Form", message: `This is a test email to verify EmailJS configuration. Test Details: - Timestamp: ${new Date().toLocaleString()} - Service ID: ${EMAILJS_SERVICE_ID} - Template ID: ${EMAILJS_TEMPLATE_ID_DEMO} If you receive this email, EmailJS is working correctly.`, reply_to: "test@performance.fyi", }; const result = await emailjs.send( EMAILJS_SERVICE_ID, EMAILJS_TEMPLATE_ID_DEMO, testParams ); alert( "✅ Test email sent successfully! Check your inbox at greg@performance.fyi" ); return result; } catch (error) { alert("❌ Test email failed: " + error.message); throw error; } } // Make test function available globally for debugging window.testEmailJS = testEmailJS; // Initialize video manager and waitlist service when DOM is loaded document.addEventListener("DOMContentLoaded", () => { new VideoManager(); // Wait a bit for all scripts to load, then initialize waitlist service setTimeout(() => { if (window.db && window.waitlistService) { window.waitlistService.initialize(window.db, null); } }, 100); });