Spaces:
Running
Running
Once I complete the contact form in get-report, it shoud calculate the scores and product a bespoke report for that person. - Follow Up Deployment
Browse files- get-report.html +64 -0
- index.html +1 -1
- prompts.txt +5 -1
- quiz.html +2 -1
- report.html +73 -7
get-report.html
CHANGED
|
@@ -91,6 +91,70 @@
|
|
| 91 |
once: true
|
| 92 |
});
|
| 93 |
feather.replace();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
</script>
|
| 95 |
</body>
|
| 96 |
</html>
|
|
|
|
| 91 |
once: true
|
| 92 |
});
|
| 93 |
feather.replace();
|
| 94 |
+
|
| 95 |
+
// Get score from URL
|
| 96 |
+
const urlParams = new URLSearchParams(window.location.search);
|
| 97 |
+
const score = urlParams.get('score');
|
| 98 |
+
|
| 99 |
+
// Update form submission
|
| 100 |
+
document.querySelector('form').addEventListener('submit', async function(e) {
|
| 101 |
+
e.preventDefault();
|
| 102 |
+
|
| 103 |
+
// Validate email
|
| 104 |
+
const email = document.getElementById('email').value;
|
| 105 |
+
if (!email.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)) {
|
| 106 |
+
alert('Please enter a valid work email address');
|
| 107 |
+
return;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
const formData = {
|
| 111 |
+
firstName: document.getElementById('firstName').value,
|
| 112 |
+
lastName: document.getElementById('lastName').value,
|
| 113 |
+
email: email,
|
| 114 |
+
company: document.getElementById('company').value,
|
| 115 |
+
leadsPerMonth: document.getElementById('leads').value,
|
| 116 |
+
score: score,
|
| 117 |
+
timestamp: new Date().toISOString()
|
| 118 |
+
};
|
| 119 |
+
|
| 120 |
+
try {
|
| 121 |
+
// In production, replace with your actual webhook URL
|
| 122 |
+
const webhookUrl = 'YOUR_WEBHOOK_URL_HERE';
|
| 123 |
+
|
| 124 |
+
if (webhookUrl && webhookUrl !== 'YOUR_WEBHOOK_URL_HERE') {
|
| 125 |
+
const response = await fetch(webhookUrl, {
|
| 126 |
+
method: 'POST',
|
| 127 |
+
headers: {
|
| 128 |
+
'Content-Type': 'application/json',
|
| 129 |
+
},
|
| 130 |
+
body: JSON.stringify(formData)
|
| 131 |
+
});
|
| 132 |
+
|
| 133 |
+
if (!response.ok) {
|
| 134 |
+
console.error('Webhook error:', await response.text());
|
| 135 |
+
}
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
// Generate personalized report based on score
|
| 139 |
+
const reportId = 'report-' + Math.random().toString(36).substr(2, 9);
|
| 140 |
+
const queryParams = new URLSearchParams({
|
| 141 |
+
id: reportId,
|
| 142 |
+
score: score,
|
| 143 |
+
firstName: encodeURIComponent(formData.firstName),
|
| 144 |
+
lastName: encodeURIComponent(formData.lastName),
|
| 145 |
+
email: encodeURIComponent(formData.email),
|
| 146 |
+
company: encodeURIComponent(formData.company || ''),
|
| 147 |
+
leadsPerMonth: formData.leadsPerMonth || ''
|
| 148 |
+
});
|
| 149 |
+
|
| 150 |
+
window.location.href = `report.html?${queryParams.toString()}`;
|
| 151 |
+
} catch (error) {
|
| 152 |
+
console.error('Error:', error);
|
| 153 |
+
// Fallback - still generate report even if webhook fails
|
| 154 |
+
const reportId = 'report-' + Math.random().toString(36).substr(2, 9);
|
| 155 |
+
window.location.href = `report.html?id=${reportId}&score=${score}`;
|
| 156 |
+
}
|
| 157 |
+
});
|
| 158 |
</script>
|
| 159 |
</body>
|
| 160 |
</html>
|
index.html
CHANGED
|
@@ -47,7 +47,7 @@
|
|
| 47 |
<p class="text-lg md:text-xl mb-10 text-gray-700 max-w-2xl mx-auto">
|
| 48 |
Take our quick assessment to discover how AI automation can transform your lead response process and help you close more deals.
|
| 49 |
</p>
|
| 50 |
-
<a href="
|
| 51 |
Start The Quiz
|
| 52 |
</a>
|
| 53 |
</div>
|
|
|
|
| 47 |
<p class="text-lg md:text-xl mb-10 text-gray-700 max-w-2xl mx-auto">
|
| 48 |
Take our quick assessment to discover how AI automation can transform your lead response process and help you close more deals.
|
| 49 |
</p>
|
| 50 |
+
<a href="quiz.html" class="bg-accent hover:bg-pink-600 text-white font-bold py-4 px-8 rounded-full text-lg transition-all duration-300 transform hover:scale-105 inline-block">
|
| 51 |
Start The Quiz
|
| 52 |
</a>
|
| 53 |
</div>
|
prompts.txt
CHANGED
|
@@ -231,4 +231,8 @@ Why visit the official site?
|
|
| 231 |
• Better performance and security
|
| 232 |
• Full functionality access
|
| 233 |
• Latest features and updates
|
| 234 |
-
• Proper authentication support
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
• Better performance and security
|
| 232 |
• Full functionality access
|
| 233 |
• Latest features and updates
|
| 234 |
+
• Proper authentication support
|
| 235 |
+
The start the quiz button doesn't work or lead anywhere
|
| 236 |
+
Once someone answers all 7 questions. The next screen is the get report screen. They fill in their contact details. These are logged via json with a webhook which I will provide.
|
| 237 |
+
Once someone answers all 7 questions. The next screen is the get report screen. They fill in their contact details. These are logged via json with a webhook which I will provide.
|
| 238 |
+
Once I complete the contact form in get-report, it shoud calculate the scores and product a bespoke report for that person.
|
quiz.html
CHANGED
|
@@ -201,7 +201,8 @@
|
|
| 201 |
updateQuestion();
|
| 202 |
} else {
|
| 203 |
// Quiz completed, redirect to get-report with score
|
| 204 |
-
|
|
|
|
| 205 |
}
|
| 206 |
}
|
| 207 |
|
|
|
|
| 201 |
updateQuestion();
|
| 202 |
} else {
|
| 203 |
// Quiz completed, redirect to get-report with score
|
| 204 |
+
const scorePercentage = Math.round((totalScore / 70) * 100);
|
| 205 |
+
window.location.href = `get-report.html?score=${scorePercentage}`;
|
| 206 |
}
|
| 207 |
}
|
| 208 |
|
report.html
CHANGED
|
@@ -43,10 +43,10 @@
|
|
| 43 |
<div class="container mx-auto px-6 py-10 max-w-4xl">
|
| 44 |
<!-- Score Section -->
|
| 45 |
<div class="text-center mb-12" data-aos="fade-up">
|
| 46 |
-
<div class="text-7xl font-bold text-accent mb-4">
|
| 47 |
-
<h1 class="text-3xl font-bold mb-6"
|
| 48 |
-
<p class="text-lg text-gray-700 max-w-2xl mx-auto">
|
| 49 |
-
|
| 50 |
</p>
|
| 51 |
</div>
|
| 52 |
|
|
@@ -72,11 +72,77 @@
|
|
| 72 |
</div>
|
| 73 |
|
| 74 |
<!-- CTA Section -->
|
| 75 |
-
<div class="text-center" data-aos="fade-up">
|
| 76 |
-
<a href="
|
| 77 |
-
|
| 78 |
</a>
|
| 79 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
</div>
|
| 81 |
|
| 82 |
<script>
|
|
|
|
| 43 |
<div class="container mx-auto px-6 py-10 max-w-4xl">
|
| 44 |
<!-- Score Section -->
|
| 45 |
<div class="text-center mb-12" data-aos="fade-up">
|
| 46 |
+
<div class="text-7xl font-bold text-accent mb-4" id="scoreDisplay">0%</div>
|
| 47 |
+
<h1 class="text-3xl font-bold mb-6" id="scoreTitle">Loading...</h1>
|
| 48 |
+
<p class="text-lg text-gray-700 max-w-2xl mx-auto" id="scoreDescription">
|
| 49 |
+
Loading your personalized report...
|
| 50 |
</p>
|
| 51 |
</div>
|
| 52 |
|
|
|
|
| 72 |
</div>
|
| 73 |
|
| 74 |
<!-- CTA Section -->
|
| 75 |
+
<div class="text-center" data-aos="fade-up" id="ctaSection">
|
| 76 |
+
<a href="#" class="bg-accent hover:bg-pink-600 text-white font-bold py-4 px-8 rounded-full text-lg transition-all duration-300 transform hover:scale-105 inline-block" id="ctaButton">
|
| 77 |
+
Loading...
|
| 78 |
</a>
|
| 79 |
</div>
|
| 80 |
+
|
| 81 |
+
<script>
|
| 82 |
+
// Get parameters from URL
|
| 83 |
+
const urlParams = new URLSearchParams(window.location.search);
|
| 84 |
+
const score = parseInt(urlParams.get('score'));
|
| 85 |
+
const firstName = decodeURIComponent(urlParams.get('firstName') || '');
|
| 86 |
+
const lastName = decodeURIComponent(urlParams.get('lastName') || '');
|
| 87 |
+
const company = decodeURIComponent(urlParams.get('company') || '');
|
| 88 |
+
const leadsPerMonth = urlParams.get('leadsPerMonth') || '';
|
| 89 |
+
|
| 90 |
+
// Personalize the report
|
| 91 |
+
const name = firstName ? `${firstName}${lastName ? ' ' + lastName : ''}` : '';
|
| 92 |
+
document.getElementById('scoreDisplay').textContent = `${score}%`;
|
| 93 |
+
|
| 94 |
+
// Determine score title and description
|
| 95 |
+
let scoreTitle, scoreDescription, ctaText, ctaLink;
|
| 96 |
+
|
| 97 |
+
if (score >= 75) {
|
| 98 |
+
scoreTitle = name ? `${name}, You're an AI Pioneer` : "AI Pioneer";
|
| 99 |
+
scoreDescription = `Your agency demonstrates exceptional readiness for AI automation. ${
|
| 100 |
+
leadsPerMonth === '200+' ?
|
| 101 |
+
'With your high lead volume, you could achieve massive efficiency gains.' :
|
| 102 |
+
'You already have advanced systems in place.'
|
| 103 |
+
} We recommend exploring our premium automation features to take your business to the next level.`;
|
| 104 |
+
ctaText = "Start Your 7-Day Free Trial";
|
| 105 |
+
ctaLink = "signup.html";
|
| 106 |
+
} else if (score >= 40) {
|
| 107 |
+
scoreTitle = name ? `${name}, You're Automation Ready` : "Automation Ready";
|
| 108 |
+
scoreDescription = `You have solid foundations for AI automation. ${
|
| 109 |
+
leadsPerMonth === '200+' ?
|
| 110 |
+
'Given your lead volume, implementing automation would significantly improve your response times and conversion rates.' :
|
| 111 |
+
'With the right tools and processes, you could capture more leads and close more deals.'
|
| 112 |
+
} Our platform can help you bridge this gap.`;
|
| 113 |
+
ctaText = "Watch a 2-Minute Demo";
|
| 114 |
+
ctaLink = "demo.html";
|
| 115 |
+
} else {
|
| 116 |
+
scoreTitle = name ? `${name}, You Have Growth Potential` : "Growth Potential";
|
| 117 |
+
scoreDescription = `There's significant opportunity to improve your lead response processes. ${
|
| 118 |
+
leadsPerMonth === '200+' ?
|
| 119 |
+
'At your lead volume, even basic automation would dramatically improve your results.' :
|
| 120 |
+
'Implementing automation would help you compete more effectively.'
|
| 121 |
+
} Start with our free guide to learn the fundamentals.`;
|
| 122 |
+
ctaText = "Download Your Free Lead Response Guide";
|
| 123 |
+
ctaLink = "download-guide.html";
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
// Update page content
|
| 127 |
+
document.getElementById('scoreTitle').textContent = scoreTitle;
|
| 128 |
+
document.getElementById('scoreDescription').textContent = scoreDescription;
|
| 129 |
+
document.getElementById('ctaButton').textContent = ctaText;
|
| 130 |
+
document.getElementById('ctaButton').href = ctaLink;
|
| 131 |
+
|
| 132 |
+
// Personalize category breakdown if company provided
|
| 133 |
+
if (company) {
|
| 134 |
+
document.querySelectorAll('.bg-gray-50 p-6.rounded-lg p').forEach(p => {
|
| 135 |
+
p.textContent = p.textContent.replace('Your', `${company}'s`);
|
| 136 |
+
});
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
AOS.init({
|
| 140 |
+
duration: 800,
|
| 141 |
+
easing: 'ease-in-out',
|
| 142 |
+
once: true
|
| 143 |
+
});
|
| 144 |
+
feather.replace();
|
| 145 |
+
</script>
|
| 146 |
</div>
|
| 147 |
|
| 148 |
<script>
|