export function contentMarketingMaturityQuiz(form: FormTs) {
form.setTitle(() => '📝 Rate Your Content Marketing Maturity');
// ============ SCORING SYSTEM ============
const scores = form.state<Record<string, number>>({});
const updateScore = (category: string, points: number) => {
scores.update(current => ({ ...current, [category]: points }));
};
const getTotalScore = () => {
const s = scores();
return Object.values(s).reduce((sum, val) => sum + (val || 0), 0);
};
const getMaxScore = () => 100;
const getScorePercentage = () => Math.round((getTotalScore() / getMaxScore()) * 100);
const getMaturityLevel = (): 'beginner' | 'developing' | 'established' | 'advanced' | 'leader' => {
const pct = getScorePercentage();
if (pct >= 85) return 'leader';
if (pct >= 70) return 'advanced';
if (pct >= 50) return 'established';
if (pct >= 30) return 'developing';
return 'beginner';
};
const getMaturityLabel = () => {
const level = getMaturityLevel();
const labels = {
beginner: '🌱 Beginner',
developing: '📈 Developing',
established: '✅ Established',
advanced: '🚀 Advanced',
leader: '🏆 Industry Leader'
};
return labels[level];
};
const getMaturityColor = () => {
const level = getMaturityLevel();
const colors = {
beginner: '#dc2626',
developing: '#ea580c',
established: '#ca8a04',
advanced: '#16a34a',
leader: '#7c3aed'
};
return colors[level];
};
// ============ COMPLETION SCREEN ============
form.configureCompletionScreen({
type: 'text',
title: () => `${getMaturityLabel()}`,
message: () => {
const pct = getScorePercentage();
const level = getMaturityLevel();
const messages = {
beginner: `Your content marketing score is ${pct}%. You're just getting started with content marketing. Focus on building a solid foundation with consistent, quality content.`,
developing: `Your content marketing score is ${pct}%. You have some content processes in place but there's significant room for growth. Your report includes quick wins to accelerate.`,
established: `Your content marketing score is ${pct}%. You have a functioning content operation. Time to optimize and scale what's working.`,
advanced: `Your content marketing score is ${pct}%. Your content marketing is performing well. Focus on advanced tactics and thought leadership.`,
leader: `Excellent! Your content marketing score is ${pct}%. You're operating at industry-leading levels. Your report includes tips to maintain your edge.`
};
return messages[level];
}
});
// ============ PAGES SETUP ============
const pages = form.addPages('quiz-pages', {
heightMode: 'current-page'
});
// ============ PAGE 1: Content Strategy ============
const page1 = pages.addPage('content-strategy', { mobileBreakpoint: 500 });
page1.addRow(row => {
row.addTextPanel('header1', {
label: 'Step 1 of 6: Content Strategy',
computedValue: () => 'How well-defined is your content marketing strategy?',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page1.addSpacer({ height: '24px' });
page1.addRow(row => {
row.addRadioButton('documentedStrategy', {
label: 'Do you have a documented content marketing strategy?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'comprehensive', name: '📋 Yes, comprehensive and regularly updated' },
{ id: 'basic', name: '📝 Yes, basic strategy document' },
{ id: 'informal', name: '💭 Informal understanding, not documented' },
{ id: 'none', name: '❌ No strategy' }
],
onValueChange: (val) => {
const points = { comprehensive: 10, basic: 6, informal: 3, none: 0 };
updateScore('strategy', points[val as keyof typeof points] || 0);
}
});
});
page1.addRow(row => {
row.addRadioButton('buyerPersonas', {
label: 'Do you have defined buyer personas for your content?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'detailed', name: '👥 Yes, detailed personas with research backing' },
{ id: 'basic', name: '📊 Basic demographics and needs defined' },
{ id: 'general', name: '🎯 General target audience only' },
{ id: 'none', name: '❌ No defined personas' }
],
onValueChange: (val) => {
const points = { detailed: 8, basic: 5, general: 2, none: 0 };
updateScore('personas', points[val as keyof typeof points] || 0);
}
});
});
page1.addRow(row => {
row.addSuggestionChips('contentGoals', {
label: 'What are your primary content marketing goals? (Select all that apply)',
isRequired: true,
suggestions: [
{ id: 'awareness', name: '📢 Brand Awareness' },
{ id: 'leads', name: '🎯 Lead Generation' },
{ id: 'seo', name: '🔍 SEO/Organic Traffic' },
{ id: 'thought-leadership', name: '💡 Thought Leadership' },
{ id: 'customer-education', name: '📚 Customer Education' },
{ id: 'retention', name: '🔄 Customer Retention' }
],
min: 1,
onValueChange: (val) => {
const points = val && val.length >= 3 ? 7 : val && val.length >= 2 ? 5 : val && val.length >= 1 ? 3 : 0;
updateScore('goals', points);
}
});
});
// ============ PAGE 2: Content Production ============
const page2 = pages.addPage('content-production', { mobileBreakpoint: 500 });
page2.addRow(row => {
row.addTextPanel('header2', {
label: 'Step 2 of 6: Content Production',
computedValue: () => 'How efficient is your content creation process?',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page2.addSpacer({ height: '24px' });
page2.addRow(row => {
row.addSlider('publishingFrequency', {
label: 'How many content pieces do you publish per month?',
isRequired: true,
min: 0,
max: 30,
step: 1,
unit: 'pieces',
defaultValue: 4,
onValueChange: (val) => {
if (val == null) return;
const points = val >= 16 ? 10 : val >= 8 ? 7 : val >= 4 ? 5 : val >= 1 ? 3 : 0;
updateScore('frequency', points);
}
});
});
page2.addRow(row => {
row.addRadioButton('contentCalendar', {
label: 'Do you use an editorial calendar?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'advanced', name: '📅 Yes, 3+ months planned with workflows' },
{ id: 'monthly', name: '🗓️ Yes, monthly planning' },
{ id: 'adhoc', name: '📝 Week-by-week or ad-hoc' },
{ id: 'none', name: '❌ No calendar' }
],
onValueChange: (val) => {
const points = { advanced: 8, monthly: 5, adhoc: 2, none: 0 };
updateScore('calendar', points[val as keyof typeof points] || 0);
}
});
});
page2.addRow(row => {
row.addSuggestionChips('contentTypes', {
label: 'What content formats do you regularly produce?',
isRequired: true,
suggestions: [
{ id: 'blog', name: '📝 Blog Posts' },
{ id: 'video', name: '🎬 Video' },
{ id: 'podcast', name: '🎙️ Podcast' },
{ id: 'ebooks', name: '📚 Ebooks/Guides' },
{ id: 'infographics', name: '📊 Infographics' },
{ id: 'webinars', name: '💻 Webinars' },
{ id: 'social', name: '📱 Social Content' },
{ id: 'newsletters', name: '📧 Newsletters' }
],
min: 1,
onValueChange: (val) => {
const points = val && val.length >= 5 ? 7 : val && val.length >= 3 ? 5 : val && val.length >= 2 ? 3 : 1;
updateScore('formats', points);
}
});
});
// ============ PAGE 3: Distribution & Promotion ============
const page3 = pages.addPage('distribution', { mobileBreakpoint: 500 });
page3.addRow(row => {
row.addTextPanel('header3', {
label: 'Step 3 of 6: Distribution & Promotion',
computedValue: () => 'How effectively do you amplify your content?',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page3.addSpacer({ height: '24px' });
page3.addRow(row => {
row.addMatrixQuestion('distributionChannels', {
label: 'Rate your effectiveness on each distribution channel:',
isRequired: true,
rows: [
{ id: 'organic-social', label: 'Organic Social Media', description: 'LinkedIn, Twitter, Facebook, etc.' },
{ id: 'email', label: 'Email Marketing', description: 'Newsletter, drip campaigns' },
{ id: 'seo', label: 'SEO/Organic Search', description: 'Google rankings' },
{ id: 'paid', label: 'Paid Promotion', description: 'Ads, sponsored content' }
],
columns: [
{ id: 'none', label: 'Not Using' },
{ id: 'basic', label: 'Basic' },
{ id: 'effective', label: 'Effective' },
{ id: 'optimized', label: 'Optimized' }
],
selectionMode: 'single',
striped: true,
fullWidth: true,
onValueChange: (val) => {
if (!val) return;
const pointsMap: Record<string, number> = { none: 0, basic: 1, effective: 2, optimized: 3 };
let total = 0;
for (const col of Object.values(val)) {
total += pointsMap[col as string] || 0;
}
updateScore('distribution', Math.min(total, 10));
}
});
});
page3.addRow(row => {
row.addRadioButton('repurposing', {
label: 'Do you repurpose content across multiple channels?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'systematic', name: '🔄 Yes, systematic repurposing strategy' },
{ id: 'occasional', name: '📋 Occasionally when it makes sense' },
{ id: 'rare', name: '🤷 Rarely' },
{ id: 'never', name: '❌ Never' }
],
onValueChange: (val) => {
const points = { systematic: 8, occasional: 5, rare: 2, never: 0 };
updateScore('repurposing', points[val as keyof typeof points] || 0);
}
});
});
// ============ PAGE 4: Analytics & Measurement ============
const page4 = pages.addPage('analytics', { mobileBreakpoint: 500 });
page4.addRow(row => {
row.addTextPanel('header4', {
label: 'Step 4 of 6: Analytics & Measurement',
computedValue: () => 'How do you measure content performance?',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page4.addSpacer({ height: '24px' });
page4.addRow(row => {
row.addSuggestionChips('kpisTracked', {
label: 'Which KPIs do you actively track?',
isRequired: true,
suggestions: [
{ id: 'traffic', name: '📈 Traffic/Pageviews' },
{ id: 'engagement', name: '💬 Engagement (time, shares)' },
{ id: 'leads', name: '🎯 Leads Generated' },
{ id: 'conversions', name: '💰 Conversions/Revenue' },
{ id: 'seo', name: '🔍 SEO Rankings' },
{ id: 'cost-per-lead', name: '📊 Cost per Lead' }
],
min: 1,
onValueChange: (val) => {
const points = val && val.length >= 5 ? 10 : val && val.length >= 3 ? 7 : val && val.length >= 2 ? 4 : 2;
updateScore('kpis', points);
}
});
});
page4.addRow(row => {
row.addRadioButton('reportingFrequency', {
label: 'How often do you review content performance?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'weekly', name: '📊 Weekly with optimization actions' },
{ id: 'monthly', name: '📅 Monthly reports' },
{ id: 'quarterly', name: '🗓️ Quarterly reviews' },
{ id: 'rarely', name: '❌ Rarely or never' }
],
onValueChange: (val) => {
const points = { weekly: 8, monthly: 5, quarterly: 3, rarely: 0 };
updateScore('reporting', points[val as keyof typeof points] || 0);
}
});
});
page4.addRow(row => {
row.addRadioButton('attribution', {
label: 'Can you attribute revenue to specific content pieces?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'full', name: '✅ Yes, full attribution tracking' },
{ id: 'partial', name: '📊 Partial attribution' },
{ id: 'basic', name: '📈 Basic lead tracking only' },
{ id: 'none', name: '❌ No attribution' }
],
onValueChange: (val) => {
const points = { full: 7, partial: 5, basic: 2, none: 0 };
updateScore('attribution', points[val as keyof typeof points] || 0);
}
});
});
// ============ PAGE 5: Results ============
const page5 = pages.addPage('results', { mobileBreakpoint: 500 });
page5.addRow(row => {
row.addTextPanel('header5', {
label: 'Step 5 of 6: Your Results',
computedValue: () => 'Your content marketing maturity assessment',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page5.addSpacer({ height: '24px' });
page5.addRow(row => {
row.addTextPanel('finalScoreLabel', {
label: '📊 Content Marketing Maturity Results',
computedValue: () => '',
customStyles: {
fontSize: '1.2rem',
fontWeight: '700',
textAlign: 'center'
}
});
});
page5.addRow(row => {
row.addTextPanel('finalMaturityLevel', {
computedValue: () => getMaturityLabel(),
customStyles: () => ({
fontSize: '1.5rem',
fontWeight: '800',
textAlign: 'center',
color: getMaturityColor(),
padding: '15px',
background: '#f9fafb',
borderRadius: '12px',
border: `3px solid ${getMaturityColor()}`
})
});
});
page5.addRow(row => {
row.addTextPanel('scoreBreakdown', {
computedValue: () => {
const total = getTotalScore();
const pct = getScorePercentage();
return `Total Score: ${total}/${getMaxScore()} (${pct}%)`;
},
customStyles: {
fontSize: '1.1rem',
fontWeight: '600',
textAlign: 'center',
color: '#374151',
marginTop: '10px'
}
});
});
page5.addRow(row => {
row.addTextPanel('recommendation', {
computedValue: () => {
const level = getMaturityLevel();
const recommendations = {
beginner: '🌱 Start with the basics: document your strategy, define your audience, and commit to a regular publishing schedule.',
developing: '📈 Focus on consistency and measurement. Build your editorial calendar and start tracking key metrics.',
established: '✅ Time to optimize! Invest in better distribution, content repurposing, and revenue attribution.',
advanced: '🚀 Level up with advanced tactics: AI tools, personalization, and predictive analytics.',
leader: '🏆 Maintain your edge with innovation, team development, and industry thought leadership.'
};
return recommendations[level];
},
customStyles: {
fontSize: '0.95rem',
color: '#4b5563',
textAlign: 'center',
padding: '15px',
background: '#f3f4f6',
borderRadius: '8px',
marginTop: '15px',
lineHeight: '1.5'
}
});
});
const detailsSection = page5.addSubform('detailsBreakdown', {
title: '📊 Detailed Score Breakdown (click to expand)',
isCollapsible: true,
customStyles: {
marginTop: '1rem',
background: '#f9fafb',
borderRadius: '8px'
}
});
detailsSection.addRow(row => {
row.addTextPanel('strategyDetail', {
label: '📋 Strategy',
computedValue: () => {
const s = scores();
const score = (s['strategy'] || 0) + (s['personas'] || 0) + (s['goals'] || 0);
return `${score}/25 points`;
},
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#dbeafe',
borderRadius: '6px'
}
}, '1fr');
row.addTextPanel('productionDetail', {
label: '📝 Production',
computedValue: () => {
const s = scores();
const score = (s['frequency'] || 0) + (s['calendar'] || 0) + (s['formats'] || 0);
return `${score}/25 points`;
},
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#dbeafe',
borderRadius: '6px'
}
}, '1fr');
});
detailsSection.addRow(row => {
row.addTextPanel('distributionDetail', {
label: '📢 Distribution',
computedValue: () => {
const s = scores();
const score = (s['distribution'] || 0) + (s['repurposing'] || 0);
return `${score}/18 points`;
},
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#dbeafe',
borderRadius: '6px'
}
}, '1fr');
row.addTextPanel('analyticsDetail', {
label: '📊 Analytics',
computedValue: () => {
const s = scores();
const score = (s['kpis'] || 0) + (s['reporting'] || 0) + (s['attribution'] || 0);
return `${score}/25 points`;
},
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#dbeafe',
borderRadius: '6px'
}
}, '1fr');
});
// ============ PAGE 6: Lead Capture ============
const page6 = pages.addPage('lead-capture', { mobileBreakpoint: 500 });
page6.addRow(row => {
row.addTextPanel('header6', {
label: 'Step 6 of 6: Get Your Report',
computedValue: () => 'Enter your details to receive your personalized content marketing report',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page6.addSpacer({ height: '24px' });
page6.addRow(row => {
row.addTextbox('name', {
label: 'Your Name',
isRequired: true,
placeholder: 'Jane Smith'
}, '1fr');
row.addEmail('email', {
label: 'Work Email',
isRequired: true,
placeholder: 'jane@company.com'
}, '1fr');
});
page6.addRow(row => {
row.addTextbox('company', {
label: 'Company Name',
placeholder: 'Acme Marketing'
}, '1fr');
row.addDropdown('role', {
label: 'Your Role',
options: [
{ id: 'cmo', name: 'CMO / VP Marketing' },
{ id: 'director', name: 'Marketing Director' },
{ id: 'manager', name: 'Content Manager' },
{ id: 'specialist', name: 'Content Specialist' },
{ id: 'owner', name: 'Business Owner' },
{ id: 'other', name: 'Other' }
],
placeholder: 'Select your role'
}, '1fr');
});
page6.addRow(row => {
row.addCheckboxList('consent', {
options: [
{ id: 'report', name: '📄 Send me the detailed PDF report', isRequired: true },
{ id: 'tips', name: '💡 Send me weekly content marketing tips' },
{ id: 'consultation', name: '📞 I\'d like a free content strategy consultation' }
],
defaultValue: ['report'],
orientation: 'vertical'
});
});
// ============ PDF REPORT ============
form.configurePdf('content-report', pdf => {
pdf.configure({
filename: 'content-marketing-maturity-report.pdf',
pageSize: 'A4',
allowUserDownload: true,
downloadButtonLabel: '📄 Download Content Report',
header: {
title: 'Content Marketing Maturity Report',
subtitle: 'Personalized Assessment Results'
},
footer: {
text: 'Generated by FormTs Content Marketing Assessment',
showPageNumbers: true
}
});
pdf.addSection('Executive Summary', section => {
section.addRow(row => {
row.addField('Maturity Level', getMaturityLabel());
row.addField('Overall Score', `${getScorePercentage()}%`);
});
section.addRow(row => {
row.addField('Assessment Date', new Date().toLocaleDateString());
row.addField('Total Points', `${getTotalScore()} / ${getMaxScore()}`);
});
});
pdf.addSection('Category Breakdown', section => {
const s = scores();
section.addTable(
['Category', 'Score', 'Max', 'Status'],
[
['Strategy', `${(s['strategy'] || 0) + (s['personas'] || 0) + (s['goals'] || 0)}`, '25', (s['strategy'] || 0) >= 7 ? '✅ Good' : '⚠️ Needs Work'],
['Production', `${(s['frequency'] || 0) + (s['calendar'] || 0) + (s['formats'] || 0)}`, '25', (s['frequency'] || 0) >= 7 ? '✅ Good' : '⚠️ Needs Work'],
['Distribution', `${(s['distribution'] || 0) + (s['repurposing'] || 0)}`, '18', (s['distribution'] || 0) >= 7 ? '✅ Good' : '⚠️ Needs Work'],
['Analytics', `${(s['kpis'] || 0) + (s['reporting'] || 0) + (s['attribution'] || 0)}`, '25', (s['kpis'] || 0) >= 7 ? '✅ Good' : '⚠️ Needs Work']
]
);
});
pdf.addPageBreak();
pdf.addSection('Recommendations', section => {
const level = getMaturityLevel();
if (level === 'beginner') {
section.addText('🌱 FOUNDATION BUILDING:');
section.addText('1. Document your content marketing strategy');
section.addText('2. Create detailed buyer personas');
section.addText('3. Set up an editorial calendar');
section.addText('4. Start with 2-4 quality pieces per month');
} else if (level === 'developing') {
section.addText('📈 GROWTH ACTIONS:');
section.addText('1. Expand content formats (add video or podcasts)');
section.addText('2. Implement basic analytics tracking');
section.addText('3. Develop a distribution strategy');
section.addText('4. Start repurposing top content');
} else if (level === 'established') {
section.addText('✅ OPTIMIZATION PRIORITIES:');
section.addText('1. Implement revenue attribution');
section.addText('2. Systematize content repurposing');
section.addText('3. A/B test headlines and CTAs');
section.addText('4. Build content partnerships');
} else {
section.addText('🚀 ADVANCED TACTICS:');
section.addText('1. Implement AI-powered content optimization');
section.addText('2. Build predictive content analytics');
section.addText('3. Develop thought leadership programs');
section.addText('4. Scale with content automation');
}
});
});
// ============ SUBMIT BUTTON ============
form.configureSubmitButton({
label: () => `📝 Get My Report (Score: ${getScorePercentage()}%)`
});
form.configureSubmitBehavior({
sendToServer: true
});
}