diff --git a/hubspot/index.html b/hubspot/index.html index 5b59b2e..fca7097 100644 --- a/hubspot/index.html +++ b/hubspot/index.html @@ -105,7 +105,7 @@ How It Works FAQ - Get Started + Join Waitlist @@ -142,7 +142,7 @@
- Get Started Free + Join Waitlist + + +

Free during beta. No credit card required.

@@ -783,6 +800,67 @@ if(!wasOpen) item.classList.add('open'); } + // WAITLIST FORM → GoHighLevel + async function submitWaitlist(e) { + e.preventDefault(); + const btn = document.getElementById('wl-btn'); + const status = document.getElementById('wl-status'); + const form = document.getElementById('waitlist-form'); + const success = document.getElementById('wl-success'); + + btn.disabled = true; + btn.textContent = 'Joining...'; + status.className = 'text-xs sm:text-sm text-zinc-400 mt-3 sm:mt-4'; + status.textContent = 'Adding you to the waitlist...'; + + const firstName = document.getElementById('wl-first').value.trim(); + const lastName = document.getElementById('wl-last').value.trim(); + const phone = document.getElementById('wl-phone').value.trim(); + const email = document.getElementById('wl-email').value.trim(); + const platformName = 'HubSpot'; + + try { + const body = { + firstName, + lastName, + phone, + tags: ['MCP waitlist', platformName], + source: 'MCPEngage Waitlist — ' + platformName + }; + if (email) body.email = email; + if (!body.name) body.name = firstName + ' ' + lastName; + + const res = await fetch('https://services.leadconnectorhq.com/contacts/', { + method: 'POST', + headers: { + 'Authorization': 'Bearer pit-0480982f-750b-4baa-bc10-1340a9b2102b', + 'Content-Type': 'application/json', + 'Version': '2021-07-28' + }, + body: JSON.stringify({ + ...body, + locationId: 'DZEpRd43MxUJKdtrev9t' + }) + }); + + if (res.ok || res.status === 200 || res.status === 201) { + form.classList.add('hidden'); + success.classList.remove('hidden'); + lucide.createIcons(); + } else { + const errData = await res.json().catch(() => ({})); + throw new Error(errData.message || 'Server error'); + } + } catch (err) { + status.className = 'text-xs sm:text-sm text-red-400 mt-3 sm:mt-4'; + status.textContent = 'Something went wrong. Please try again.'; + btn.disabled = false; + btn.textContent = 'Join Waitlist'; + console.error('Waitlist error:', err); + } + return false; + } + // MAGNETIC BUTTONS if(window.innerWidth >= 1024) { document.querySelectorAll('.magnetic-btn').forEach(btn => { diff --git a/salesforce/index.html b/salesforce/index.html index f28d805..7a58c8e 100644 --- a/salesforce/index.html +++ b/salesforce/index.html @@ -105,7 +105,7 @@ How It Works FAQ - Get Started + Join Waitlist @@ -142,7 +142,7 @@
- Get Started Free + Join Waitlist + + +

Free during beta. No credit card required.

@@ -783,6 +800,67 @@ if(!wasOpen) item.classList.add('open'); } + // WAITLIST FORM → GoHighLevel + async function submitWaitlist(e) { + e.preventDefault(); + const btn = document.getElementById('wl-btn'); + const status = document.getElementById('wl-status'); + const form = document.getElementById('waitlist-form'); + const success = document.getElementById('wl-success'); + + btn.disabled = true; + btn.textContent = 'Joining...'; + status.className = 'text-xs sm:text-sm text-zinc-400 mt-3 sm:mt-4'; + status.textContent = 'Adding you to the waitlist...'; + + const firstName = document.getElementById('wl-first').value.trim(); + const lastName = document.getElementById('wl-last').value.trim(); + const phone = document.getElementById('wl-phone').value.trim(); + const email = document.getElementById('wl-email').value.trim(); + const platformName = 'Salesforce'; + + try { + const body = { + firstName, + lastName, + phone, + tags: ['MCP waitlist', platformName], + source: 'MCPEngage Waitlist — ' + platformName + }; + if (email) body.email = email; + if (!body.name) body.name = firstName + ' ' + lastName; + + const res = await fetch('https://services.leadconnectorhq.com/contacts/', { + method: 'POST', + headers: { + 'Authorization': 'Bearer pit-0480982f-750b-4baa-bc10-1340a9b2102b', + 'Content-Type': 'application/json', + 'Version': '2021-07-28' + }, + body: JSON.stringify({ + ...body, + locationId: 'DZEpRd43MxUJKdtrev9t' + }) + }); + + if (res.ok || res.status === 200 || res.status === 201) { + form.classList.add('hidden'); + success.classList.remove('hidden'); + lucide.createIcons(); + } else { + const errData = await res.json().catch(() => ({})); + throw new Error(errData.message || 'Server error'); + } + } catch (err) { + status.className = 'text-xs sm:text-sm text-red-400 mt-3 sm:mt-4'; + status.textContent = 'Something went wrong. Please try again.'; + btn.disabled = false; + btn.textContent = 'Join Waitlist'; + console.error('Waitlist error:', err); + } + return false; + } + // MAGNETIC BUTTONS if(window.innerWidth >= 1024) { document.querySelectorAll('.magnetic-btn').forEach(btn => { diff --git a/zendesk/index.html b/zendesk/index.html index 2e6f38d..a3071fc 100644 --- a/zendesk/index.html +++ b/zendesk/index.html @@ -105,7 +105,7 @@ How It Works FAQ - Get Started + Join Waitlist @@ -142,7 +142,7 @@
- Get Started Free + Join Waitlist + + +

Free during beta. No credit card required.

@@ -783,6 +800,67 @@ if(!wasOpen) item.classList.add('open'); } + // WAITLIST FORM → GoHighLevel + async function submitWaitlist(e) { + e.preventDefault(); + const btn = document.getElementById('wl-btn'); + const status = document.getElementById('wl-status'); + const form = document.getElementById('waitlist-form'); + const success = document.getElementById('wl-success'); + + btn.disabled = true; + btn.textContent = 'Joining...'; + status.className = 'text-xs sm:text-sm text-zinc-400 mt-3 sm:mt-4'; + status.textContent = 'Adding you to the waitlist...'; + + const firstName = document.getElementById('wl-first').value.trim(); + const lastName = document.getElementById('wl-last').value.trim(); + const phone = document.getElementById('wl-phone').value.trim(); + const email = document.getElementById('wl-email').value.trim(); + const platformName = 'Zendesk'; + + try { + const body = { + firstName, + lastName, + phone, + tags: ['MCP waitlist', platformName], + source: 'MCPEngage Waitlist — ' + platformName + }; + if (email) body.email = email; + if (!body.name) body.name = firstName + ' ' + lastName; + + const res = await fetch('https://services.leadconnectorhq.com/contacts/', { + method: 'POST', + headers: { + 'Authorization': 'Bearer pit-0480982f-750b-4baa-bc10-1340a9b2102b', + 'Content-Type': 'application/json', + 'Version': '2021-07-28' + }, + body: JSON.stringify({ + ...body, + locationId: 'DZEpRd43MxUJKdtrev9t' + }) + }); + + if (res.ok || res.status === 200 || res.status === 201) { + form.classList.add('hidden'); + success.classList.remove('hidden'); + lucide.createIcons(); + } else { + const errData = await res.json().catch(() => ({})); + throw new Error(errData.message || 'Server error'); + } + } catch (err) { + status.className = 'text-xs sm:text-sm text-red-400 mt-3 sm:mt-4'; + status.textContent = 'Something went wrong. Please try again.'; + btn.disabled = false; + btn.textContent = 'Join Waitlist'; + console.error('Waitlist error:', err); + } + return false; + } + // MAGNETIC BUTTONS if(window.innerWidth >= 1024) { document.querySelectorAll('.magnetic-btn').forEach(btn => {