To connect a client's public website contact form directly into their Vanquish CRM Pipeline, attach the following JavaScript payload to their form submission event.
<form id="vanquishContactForm">
<input type="text" id="vName" placeholder="Full Name" required>
<input type="email" id="vEmail" placeholder="Email Address" required>
<input type="tel" id="vPhone" placeholder="Phone Number">
<textarea id="vService" placeholder="Service Requested"></textarea>
<button type="submit">Send Request</button>
</form>
Ensure you replace CLIENT_EMAIL_HERE with the exact email address used to provision their dashboard, and insert your Firebase Config.
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.12.2/firebase-app.js";
import { getFirestore, collection, addDoc, serverTimestamp } from "https://www.gstatic.com/firebasejs/10.12.2/firebase-firestore.js";
// Initialize with your Vanquish Firebase Config here
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
// ... other config vars
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
document.getElementById('vanquishContactForm').addEventListener('submit', async (e) => {
e.preventDefault();
const clientEmail = "CLIENT_EMAIL_HERE"; // MUST MATCH CRM LOGIN
try {
await addDoc(collection(db, "users", clientEmail, "leads"), {
name: document.getElementById('vName').value,
email: document.getElementById('vEmail').value,
phone: document.getElementById('vPhone').value,
service: document.getElementById('vService').value,
timestamp: serverTimestamp()
});
alert("Lead submitted securely!");
e.target.reset();
} catch (err) {
console.error("CRM Injection Failed: ", err);
}
});
vanquish-analytics-bot@caramel-pulsar-487016-t6.iam.gserviceaccount.com*Skip this step if the client is not paying for SEO services.
https://example.com/ or sc-domain:example.com).