āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āĻœā§‡āύāĻžāϰ⧇āϟāϰ ⧍ā§Ļ⧍ā§Ģ

āĻāφāχ āϏāĻšāĻžāϝāĻŧāϤāĻžāϝāĻŧ āϏāĻŽā§āĻĒā§‚āĻ°ā§āĻŖ āĻāϏāχāĻ“ āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āĻœā§‡āύāĻžāϰ⧇āϟāϰāĨ¤ āϰāĻŋāϝāĻŧ⧇āϞ-āϟāĻžāχāĻŽ āĻĒā§āϰāĻŋāĻ­āĻŋāω āĻāĻŦāĻ‚ āĻ…āĻ•ā§āώāϰ āϝāĻžāϚāĻžāχāĻ•āϰāĻŖ āϏāĻš āĻ…āĻĒāϟāĻŋāĻŽāĻžāχāϜāĻĄ āĻŽā§‡āϟāĻž āϟāĻžāχāĻŸā§‡āϞ, āĻŦāĻ°ā§āĻŖāύāĻž, āĻ“āĻĒ⧇āύ āĻ—ā§āϰāĻžāĻĢ āĻŸā§āϝāĻžāĻ—, āϟ⧁āχāϟāĻžāϰ āĻ•āĻžāĻ°ā§āĻĄ āĻāĻŦāĻ‚ āĻ¸ā§āĻ•āĻŋāĻŽāĻž āĻŽāĻžāĻ°ā§āĻ•āφāĻĒ āϤ⧈āϰāĻŋ āĻ•āϰ⧁āύāĨ¤

🔍 āϏāĻžāĻ°ā§āϚ āĻĢāϞāĻžāĻĢāϞ āĻĒā§āϰāĻŋāĻ­āĻŋāω

āφāĻĒāύāĻžāϰ āĻĒ⧇āĻœā§‡āϰ āĻļāĻŋāϰ⧋āύāĻžāĻŽ āĻāĻ–āĻžāύ⧇ āĻĻ⧇āĻ–āĻž āϝāĻžāĻŦ⧇
https://example.com/page
āφāĻĒāύāĻžāϰ āĻĒ⧇āĻœā§‡āϰ āĻŦāĻŋāώāϝāĻŧāĻŦāĻ¸ā§āϤ⧁āϰ āĻāĻ•āϟāĻŋ āĻĒā§āϰāĻŋāĻ­āĻŋāω āĻĻ⧇āĻ–āĻžāύ⧋āϰ āϜāĻ¨ā§āϝ āφāĻĒāύāĻžāϰ āĻŽā§‡āϟāĻž āĻŦāĻŋāĻŦāϰāĻŖ āĻāĻ–āĻžāύ⧇ āĻĒā§āϰāĻĻāĻ°ā§āĻļāĻŋāϤ āĻšāĻŦ⧇āĨ¤

📱 āĻŽā§‹āĻŦāĻžāχāϞ āĻĒā§āϰāĻŋāĻ­āĻŋāω

āφāĻĒāύāĻžāϰ āĻĒ⧇āĻœā§‡āϰ āĻļāĻŋāϰ⧋āύāĻžāĻŽ...
https://example.com/page
āφāĻĒāύāĻžāϰ āĻŽā§‡āϟāĻž āĻŦāĻŋāĻŦāϰāĻŖ...

📘 āĻ“āĻĒ⧇āύ āĻ—ā§āϰāĻžāĻĢ (āĻĢ⧇āϏāĻŦ⧁āĻ•, āϞāĻŋāĻ‚āĻ•āĻĄāχāύ)

đŸĻ āϟ⧁āχāϟāĻžāϰ āĻ•āĻžāĻ°ā§āĻĄ

📘 āĻĢ⧇āϏāĻŦ⧁āĻ• āĻĒā§āϰāĻŋāĻ­āĻŋāω

āĻ›āĻŦāĻŋāϰ āĻĒā§āϰāĻŋāĻ­āĻŋāω (⧧⧍ā§Ļā§Ļxā§Ŧā§Šā§Ļ āĻĒāĻŋāĻ•ā§āϏ⧇āϞ)
āφāĻĒāύāĻžāϰ āĻ“āϜāĻŋ āĻļāĻŋāϰ⧋āύāĻžāĻŽ
EXAMPLE.COM
āφāĻĒāύāĻžāϰ āĻ“āϜāĻŋ āĻŦāĻŋāĻŦāϰāĻŖ āĻāĻ–āĻžāύ⧇ āĻĻ⧇āĻ–āĻž āϝāĻžāĻŦ⧇āĨ¤

đŸĻ āϟ⧁āχāϟāĻžāϰ āĻĒā§āϰāĻŋāĻ­āĻŋāω

āϟ⧁āχāϟāĻžāϰ āĻ•āĻžāĻ°ā§āĻĄ āĻ›āĻŦāĻŋ
āφāĻĒāύāĻžāϰ āϟ⧁āχāϟāĻžāϰ āĻļāĻŋāϰ⧋āύāĻžāĻŽ
āφāĻĒāύāĻžāϰ āϟ⧁āχāϟāĻžāϰ āĻŦāĻŋāĻŦāϰāĻŖāĨ¤
@āφāĻĒāύāĻžāϰāĻšā§āϝāĻžāĻ¨ā§āĻĄā§‡āϞ

📊 āĻ¸ā§āĻ•āĻŋāĻŽāĻž āĻŽāĻžāĻ°ā§āĻ•āφāĻĒ āĻœā§‡āύāĻžāϰ⧇āϟāϰ

📊 āĻ¸ā§āĻ•āĻŋāĻŽāĻž āĻĒā§āϰāĻŋāĻ­āĻŋāω

āϰāĻŋāϚ āϰ⧇āϜāĻžāĻ˛ā§āϟ āĻĒā§āϰāĻŋāĻ­āĻŋāω
āĻĒā§āϰāĻŋāĻ­āĻŋāω āĻĻ⧇āĻ–āϤ⧇ āĻ¸ā§āĻ•āĻŋāĻŽāĻžāϰ āϧāϰāύ āύāĻŋāĻ°ā§āĻŦāĻžāϚāύ āĻ•āϰ⧁āύ āĻāĻŦāĻ‚ āĻ•ā§āώ⧇āĻ¤ā§āϰāϗ⧁āϞāĻŋ āĻĒā§‚āϰāĻŖ āĻ•āϰ⧁āύ

🔍 āĻ¸ā§āĻ•āĻŋāĻŽāĻž āϝāĻžāϚāĻžāχāĻ•āϰāĻŖ

āĻāχ āĻ…āĻĢāĻŋāϏāĻŋāϝāĻŧāĻžāϞ āϟ⧁āϞāϗ⧁āϞāĻŋ āĻĻāĻŋāϝāĻŧ⧇ āφāĻĒāύāĻžāϰ āĻœā§‡āύāĻžāϰ⧇āϟ āĻ•āϰāĻž āĻ¸ā§āĻ•āĻŋāĻŽāĻž āĻŽāĻžāĻ°ā§āĻ•āφāĻĒ āĻĒāϰ⧀āĻ•ā§āώāĻž āĻ•āϰ⧁āύ

⚡ āĻŦāĻžāĻ˛ā§āĻ• āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āĻœā§‡āύāĻžāϰ⧇āĻļāύ

āĻāĻ•āĻžāϧāĻŋāĻ• āĻĒ⧃āĻˇā§āĻ āĻžāϰ āϜāĻ¨ā§āϝ āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āϤ⧈āϰāĻŋ āĻ•āϰāϤ⧇ āφāĻĒāύāĻžāϰ āĻĒ⧃āĻˇā§āĻ āĻžāϰ āϤāĻĨā§āϝ āϏāĻš āĻāĻ•āϟāĻŋ CSV āĻĢāĻžāχāϞ āφāĻĒāϞ⧋āĻĄ āĻ•āϰ⧁āύāĨ¤

📤 CSV āĻĢāĻžāχāϞ āφāĻĒāϞ⧋āĻĄ āĻ•āϰ⧁āύ

Required CSV columns:
â€ĸ title (page title)
â€ĸ description (meta description)
â€ĸ url (page URL)
â€ĸ keywords (optional)
â€ĸ author (optional)

📊 āĻŦāĻžāĻ˛ā§āĻ• āĻ…āĻĒāĻļāύāϏāĻŽā§‚āĻš

🚀 āĻĻā§āϰ⧁āϤ āĻļ⧁āϰ⧁āϰ āĻŸā§‡āĻŽāĻĒā§āϞ⧇āϟ

📝 āĻŦā§āϞāĻ— āĻĒā§‹āĻ¸ā§āϟ
āĻŦā§āϞāĻ— āφāĻ°ā§āϟāĻŋāϕ⧇āϞ āĻāĻŦāĻ‚ āĻ•āύāĻŸā§‡āĻ¨ā§āϟ āĻŽāĻžāĻ°ā§āϕ⧇āϟāĻŋāĻ‚āϝāĻŧ⧇āϰ āϜāĻ¨ā§āϝ āĻ…āĻĒāϟāĻŋāĻŽāĻžāχāϜ āĻ•āϰāĻž
đŸ›ī¸ āĻĒā§āϰ⧋āĻĄāĻžāĻ•ā§āϟ āĻĒ⧇āϜ
āϰāĻŋāĻ­āĻŋāω āĻāĻŦāĻ‚ āĻŽā§‚āĻ˛ā§āϝāϏāĻš āχ-āĻ•āĻŽāĻžāĻ°ā§āϏ āĻĒā§āϰ⧋āĻĄāĻžāĻ•ā§āϟ
đŸ’ŧ āϏāĻžāĻ°ā§āĻ­āĻŋāϏ āĻĒ⧇āϜ
āĻĒā§āϰāĻĢ⧇āĻļāύāĻžāϞ āϏāĻžāĻ°ā§āĻ­āĻŋāϏ āĻŦāĻž āĻŦā§āϝāĻŦāϏāĻžāϰ āĻĒ⧇āϜ
📍 āϞ⧋āĻ•āĻžāϞ āĻŦā§āϝāĻŦāϏāĻž
āĻ…āĻŦāĻ¸ā§āĻĨāĻžāύ āĻāĻŦāĻ‚ āϏāĻŽāϝāĻŧāϏ⧂āĻšā§€āϏāĻš āĻ¸ā§āĻĨāĻžāύ⧀āϝāĻŧ āĻŦā§āϝāĻŦāϏāĻž
đŸŽŸī¸ āχāϭ⧇āĻ¨ā§āϟ āĻĒ⧇āϜ
āϤāĻžāϰāĻŋāĻ–, āϏāĻŽāϝāĻŧ āĻāĻŦāĻ‚ āĻ¸ā§āĻĨāĻžāύāϏāĻš āχāϭ⧇āĻ¨ā§āϟ
📚 āϕ⧀āĻ­āĻžāĻŦ⧇ āĻ•āϰāĻŦ⧇āύ āĻ—āĻžāχāĻĄ
āϧāĻžāĻĒ⧇ āϧāĻžāĻĒ⧇ āϟāĻŋāωāĻŸā§‹āϰāĻŋāϝāĻŧāĻžāϞ āĻŦāĻž āĻ—āĻžāχāĻĄ

✨ Smart Nation's Core Infrastructure: WIA Code ✨

āĻĄā§āϰ⧋āύãƒģāϰ⧋āĻŦāϟ āĻĄā§‡āϞāĻŋāĻ­āĻžāϰāĻŋ, āĻ¸ā§āĻŦāϝāĻŧāĻ‚āĻ•ā§āϰāĻŋāϝāĻŧ āĻĄā§āϰāĻžāχāĻ­āĻŋāĻ‚, āϜāϰ⧁āϰāĻŋ āωāĻĻā§āϧāĻžāϰ āĻāĻŦāĻ‚ āφāϰāĻ“ āĻ…āύ⧇āĻ• āĻ•āĻŋāϛ⧁ - āφāĻĒāύāĻžāϰ āĻĻ⧇āĻļ⧇āϰ āϜāĻ¨ā§āϝ ā§Šā§Ļ āĻĻāĻŋāύ āϏāĻŽā§āĻĒā§‚āĻ°ā§āĻŖ āĻŦāĻŋāύāĻžāĻŽā§‚āĻ˛ā§āϝ⧇ āĻ­āĻŦāĻŋāĻˇā§āϝāϤ⧇āϰ āĻ…āĻ­āĻŋāĻœā§āĻžāϤāĻž āύāĻŋāύ!

WIA āϕ⧋āĻĄ āϏāĻŽā§āĻĒāĻ°ā§āϕ⧇ āφāϰāĻ“ āϜāĻžāύ⧁āύ

🤖 āφāĻĒāύāĻžāϰ āĻāφāχ āϏāĻšāĻ•āĻžāϰ⧀ āĻŦ⧇āϛ⧇ āύāĻŋāύ

đŸ’Ŧ āĻšā§āϝāĻžāϟāϜāĻŋāĻĒāĻŋāϟāĻŋ
āϏāĻ°ā§āĻŦāĻžāϧāĻŋāĻ• āĻŦāĻšā§āĻŽā§āĻ–ā§€ â€ĸ āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āĻ…āĻĒāϟāĻŋāĻŽāĻžāχāĻœā§‡āĻļāύ⧇āϰ āϜāĻ¨ā§āϝ āϏāĻ°ā§āĻŦā§‹āĻ¤ā§āϤāĻŽ
🧠 āĻ•ā§āϞāĻĄ
āϏ⧇āϰāĻž āϝ⧁āĻ•ā§āϤāĻŋ āĻĒā§āϰāĻĻāĻžāύ â€ĸ āĻāϏāχāĻ“ āĻŦāĻŋāĻļā§āϞ⧇āώāĻŖ āĻāĻŦāĻ‚ āĻ…āĻĒāϟāĻŋāĻŽāĻžāχāĻœā§‡āĻļāύ⧇āϰ āϜāĻ¨ā§āϝ āύāĻŋāϖ⧁āρāϤ
✨ āĻœā§‡āĻŽāĻŋāύāĻžāχ āĻŦāĻŋāύāĻžāĻŽā§‚āĻ˛ā§āϝ
āĻĻ⧈āύāĻŋāĻ• āĻĢā§āϰāĻŋ āϏ⧀āĻŽāĻž â€ĸ āĻŦāĻŋāĻ˛ā§āϟ-āχāύ āĻāϏāχāĻ“ āĻšā§āϝāĻžāϟ āϏāĻšāĻ•āĻžāϰ⧀
`; document.getElementById('schema-output').textContent = schemaOutput; // Generate complete output generateAllFormats(); // Show results document.getElementById('resultContainer').style.display = 'block'; trackEvent('schema_generated', { type: schemaType }); showNotification('Schema markup generated successfully!', 'success'); } function generateAllFormats() { const htmlOutput = document.getElementById('html-output').textContent; const ogOutput = document.getElementById('og-output').textContent; const twitterOutput = document.getElementById('twitter-output').textContent; const schemaOutput = document.getElementById('schema-output').textContent; let completeOutput = ` \n\n\n \n \n\n`; if (htmlOutput && htmlOutput.trim() !== '') { completeOutput += ` ${htmlOutput.replace(/\n/g, '\n ')}\n`; } if (ogOutput && ogOutput.trim() !== '') { completeOutput += ` ${ogOutput.replace(/\n/g, '\n ')}\n`; } if (twitterOutput && twitterOutput.trim() !== '') { completeOutput += ` ${twitterOutput.replace(/\n/g, '\n ')}\n`; } if (schemaOutput && schemaOutput.trim() !== '') { completeOutput += ` ${schemaOutput.replace(/\n/g, '\n ')}\n`; } completeOutput += `\n\n \n \n`; document.getElementById('all-output').textContent = completeOutput; } // ========== BULK GENERATION ========== function handleCSVUpload(event) { const file = event.target.files[0]; if (!file) return; const reader = new FileReader(); reader.onload = function(e) { const csv = e.target.result; parseBulkCSV(csv); }; reader.readAsText(file); } function parseBulkCSV(csv) { const lines = csv.split('\n'); const headers = lines[0].split(',').map(h => h.trim().toLowerCase()); // Validate required columns const requiredColumns = ['title', 'description', 'url']; const missingColumns = requiredColumns.filter(col => !headers.includes(col)); if (missingColumns.length > 0) { showNotification(`Missing required columns: ${missingColumns.join(', ')}`, 'error'); return; } bulkData = []; for (let i = 1; i < lines.length; i++) { const line = lines[i].trim(); if (!line) continue; const values = parseCSVLine(line); if (values.length < headers.length) continue; const row = {}; headers.forEach((header, index) => { row[header] = values[index] || ''; }); bulkData.push(row); } if (bulkData.length === 0) { showNotification('āϏāĻŋāĻāϏāĻ­āĻŋ āĻĢāĻžāχāϞ⧇ āϕ⧋āύ āĻŦ⧈āϧ āϤāĻĨā§āϝ āĻĒāĻžāĻ“āϝāĻŧāĻž āϝāĻžāϝāĻŧāύāĻŋ', 'error'); return; } document.getElementById('bulkGenerateBtn').disabled = false; showNotification(`Loaded ${bulkData.length} rows from CSV`, 'success'); } function parseCSVLine(line) { const result = []; let current = ''; let inQuotes = false; for (let i = 0; i < line.length; i++) { const char = line[i]; if (char === '"') { inQuotes = !inQuotes; } else if (char === ',' && !inQuotes) { result.push(current.trim()); current = ''; } else { current += char; } } result.push(current.trim()); return result; } function processBulkGeneration() { if (bulkData.length === 0) { showNotification('āĻ…āύ⧁āĻ—ā§āϰāĻš āĻ•āϰ⧇ āĻĒā§āϰāĻĨāĻŽā§‡ āĻāĻ•āϟāĻŋ āϏāĻŋāĻāϏāĻ­āĻŋ āĻĢāĻžāχāϞ āφāĻĒāϞ⧋āĻĄ āĻ•āϰ⧁āύ', 'error'); return; } const siteName = document.getElementById('bulkSiteName').value.trim(); const defaultImage = document.getElementById('bulkOgImage').value.trim(); const schemaType = document.getElementById('bulkSchemaType').value; bulkResults = []; // Show progress document.getElementById('bulk-results').style.display = 'block'; document.getElementById('progress-text').textContent = 'Processing...'; let processed = 0; bulkData.forEach((row, index) => { setTimeout(() => { const result = generateMetaForRow(row, siteName, defaultImage, schemaType); bulkResults.push(result); processed++; const progress = (processed / bulkData.length) * 100; document.getElementById('progress-bar').style.width = progress + '%'; document.getElementById('progress-text').textContent = `Processed ${processed} of ${bulkData.length} pages`; if (processed === bulkData.length) { document.getElementById('downloadBtn').style.display = 'block'; showNotification('Bulk generation completed!', 'success'); trackEvent('bulk_generation_completed', { count: bulkData.length }); } }, index * 100); // Stagger processing for better UX }); } function generateMetaForRow(row, siteName, defaultImage, schemaType) { const title = row.title || ''; const description = row.description || ''; const url = row.url || ''; const keywords = row.keywords || ''; const author = row.author || ''; const image = row.image || defaultImage; let metaTags = ''; // Basic meta tags metaTags += `${escapeHtml(title)}\n`; metaTags += `\n`; if (keywords) { metaTags += `\n`; } if (author) { metaTags += `\n`; } metaTags += `\n\n`; // Open Graph metaTags += `\n`; metaTags += `\n`; metaTags += `\n`; metaTags += `\n`; if (image) { metaTags += `\n`; } if (siteName) { metaTags += `\n`; } metaTags += `\n`; // Twitter Cards metaTags += `\n`; metaTags += `\n`; metaTags += `\n`; if (image) { metaTags += `\n`; } // Schema markup if (schemaType !== 'none') { const schema = { "@context": "https://schema.org", "@type": schemaType, "name": title, "description": description, "url": url }; if (image) { schema.image = image; } if (author) { schema.author = { "@type": "Person", "name": author }; } metaTags += `\n\n`; } return { url: url, title: title, description: description, metaTags: metaTags }; } function downloadBulkResults() { if (bulkResults.length === 0) { showNotification('āĻĄāĻžāωāύāϞ⧋āĻĄ āĻ•āϰāĻžāϰ āĻŽāϤ⧋ āϕ⧋āύ āĻĢāϞāĻžāĻĢāϞ āύ⧇āχ', 'error'); return; } let csvContent = 'URL,Title,Description,MetaTags\n'; bulkResults.forEach(result => { const metaTagsEscaped = result.metaTags.replace(/"/g, '""'); csvContent += `"${result.url}","${result.title}","${result.description}","${metaTagsEscaped}"\n`; }); const blob = new Blob([csvContent], { type: 'text/csv' }); const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'meta-tags-results.csv'; a.click(); window.URL.revokeObjectURL(url); trackEvent('bulk_results_downloaded'); } function downloadSampleCSV() { const sampleData = `title,description,url,keywords,author "Best SEO Tips for 2025","Learn the latest SEO strategies and techniques to improve your website rankings in 2025","https://example.com/seo-tips-2025","SEO, tips, 2025, rankings","āϜāύ āĻĄā§‹" "āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āĻœā§‡āύāĻžāϰ⧇āϟāϰ āĻ—āĻžāχāĻĄ","āωāĻ¨ā§āύāϤ āϏāĻžāĻ°ā§āϚ āχāĻžā§āϜāĻŋāύ āĻĻ⧃āĻļā§āϝāĻŽāĻžāύāϤāĻžāϰ āϜāĻ¨ā§āϝ āĻ…āĻĒāϟāĻŋāĻŽāĻžāχāϜāĻĄ āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āϤ⧈āϰāĻŋāϰ āϏāĻŽā§āĻĒā§‚āĻ°ā§āĻŖ āĻ—āĻžāχāĻĄ","https://example.com/meta-tag-guide","meta tags, SEO, optimization","āĻœā§‡āύ āĻ¸ā§āĻŽāĻŋāĻĨ" "āĻ¸ā§āĻ•āĻŋāĻŽāĻž āĻŽāĻžāĻ°ā§āĻ•āφāĻĒ āϟāĻŋāωāĻŸā§‹āϰāĻŋāϝāĻŧāĻžāϞ","Step-by-step tutorial on implementing schema markup for rich snippets","https://example.com/schema-tutorial","schema markup, rich snippets, structured data","āĻŦāĻŦ āϜāύāϏāύ"`; const blob = new Blob([sampleData], { type: 'text/csv' }); const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'meta-tags-sample.csv'; a.click(); window.URL.revokeObjectURL(url); } // ========== SAMPLE TEMPLATES ========== function useSample(sampleType) { const samples = { 'blog': { title: '⧍ā§Ļ⧍ā§Ģ āϏāĻžāϞ⧇āϰ āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āϏāĻŽā§āĻĒā§‚āĻ°ā§āĻŖ āĻ—āĻžāχāĻĄ: āĻāϏāχāĻ“ āϏ⧇āϰāĻž āĻ…āύ⧁āĻļā§€āϞāύ', description: 'āĻ…āĻĒāϟāĻŋāĻŽāĻžāχāϜāĻĄ āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āϤ⧈āϰāĻŋ āĻ•āϰāĻž āĻļāĻŋāϖ⧁āύ āϝāĻž āϏāĻžāĻ°ā§āϚ āĻ°â€ā§āϝāĻžāĻ™ā§āĻ•āĻŋāĻ‚ āĻāĻŦāĻ‚ āĻ•ā§āϞāĻŋāĻ•-āĻĨā§āϰ⧁ āϰ⧇āϟ āωāĻ¨ā§āύāϤ āĻ•āϰ⧇āĨ¤ āωāĻĻāĻžāĻšāϰāĻŖ, āϟ⧁āϞāϏ āĻāĻŦāĻ‚ ⧍ā§Ļ⧍ā§Ģ āϏāĻžāϞ⧇āϰ āϏ⧇āϰāĻž āĻāϏāχāĻ“ āĻ…āύ⧁āĻļā§€āϞāύ āĻ…āĻ¨ā§āϤāĻ°ā§āϭ⧁āĻ•ā§āϤāĨ¤', keywords: 'meta tags, SEO, search optimization, SERP, click-through rates', url: 'https://yoursite.com/meta-tags-guide-2025', author: 'āĻāϏāχāĻ“ āĻŦāĻŋāĻļ⧇āώāĻœā§āĻž', ogTitle: 'Complete Guide to Meta Tags in 2025', ogDescription: 'Master meta tag optimization with our comprehensive 2025 guide. Boost your search rankings and CTR with proven strategies.', ogImage: 'https://yoursite.com/images/meta-tags-guide.jpg', siteName: 'āφāĻĒāύāĻžāϰ āĻāϏāχāĻ“ āĻŦā§āϞāĻ—', twitterCardType: 'summary_large_image', twitterSite: '@yourseosite', schemaType: 'āĻŦā§āϞāĻ— āĻĒā§‹āĻ¸ā§āϟāĻŋāĻ‚' }, 'product': { title: 'āĻĒā§āϰāĻŋāĻŽāĻŋāϝāĻŧāĻžāĻŽ āĻ“āϝāĻŧā§āϝāĻžāϰāϞ⧇āϏ āĻšā§‡āĻĄāĻĢā§‹āύ - āύāϝāĻŧ⧇āϜ āĻ•ā§āϝāĻžāĻ¨ā§āϏ⧇āϞāĻŋāĻ‚ | āχāϝāĻŧā§‹āϰāĻ¸ā§āĻŸā§‹āϰ', description: 'āĻĒā§āϰāĻŋāĻŽāĻŋāϝāĻŧāĻžāĻŽ āĻ“āϝāĻŧā§āϝāĻžāϰāϞ⧇āϏ āĻšā§‡āĻĄāĻĢā§‹āύ āĻ…ā§āϝāĻžāĻ•ā§āϟāĻŋāĻ­ āύāϝāĻŧ⧇āϜ āĻ•ā§āϝāĻžāĻ¨ā§āϏ⧇āϞāĻŋāĻ‚, ā§Šā§Ļ āϘāĻŖā§āϟāĻžāϰ āĻŦā§āϝāĻžāϟāĻžāϰāĻŋ āϞāĻžāχāĻĢ āĻāĻŦāĻ‚ āϏ⧁āĻĒāĻŋāϰāĻŋāϝāĻŧāϰ āϏāĻžāωāĻ¨ā§āĻĄ āϕ⧋āϝāĻŧāĻžāϞāĻŋāϟāĻŋ āϏāĻšāĨ¤ āĻŦāĻŋāύāĻžāĻŽā§‚āĻ˛ā§āϝ⧇ āĻļāĻŋāĻĒāĻŋāĻ‚ āĻāĻŦāĻ‚ ⧍ āĻŦāĻ›āϰ⧇āϰ āĻ“āϝāĻŧāĻžāϰ⧇āĻ¨ā§āϟāĻŋ āĻ…āĻ¨ā§āϤāĻ°ā§āϭ⧁āĻ•ā§āϤāĨ¤', keywords: 'wireless headphones, noise cancelling, premium audio, bluetooth headphones', url: 'https://yourstore.com/premium-wireless-headphones', author: 'āχāϝāĻŧā§‹āϰāĻ¸ā§āĻŸā§‹āϰ āϟāĻŋāĻŽ', ogTitle: 'Premium Wireless Headphones - Noise Cancelling', ogDescription: 'Experience superior sound with our premium wireless headphones. Active noise cancelling, 30-hour battery, free shipping.', ogImage: 'https://yourstore.com/images/headphones-hero.jpg', siteName: 'āχāϝāĻŧā§‹āϰāĻ¸ā§āĻŸā§‹āϰ', twitterCardType: 'summary_large_image', twitterSite: '@yourstore', schemaType: 'Product' }, 'service': { title: 'āĻĒā§āϰāĻĢ⧇āĻļāύāĻžāϞ āĻāϏāχāĻ“ āϏāĻžāĻ°ā§āĻ­āĻŋāϏ - āφāĻĒāύāĻžāϰ āĻ°â€ā§āϝāĻžāĻ™ā§āĻ•āĻŋāĻ‚ āĻŦāĻžāĻĄāĻŧāĻžāύ | āĻĄāĻŋāϜāĻŋāϟāĻžāϞ āĻāĻœā§‡āĻ¨ā§āϏāĻŋ', description: 'āĻĢāϞāĻžāĻĢāϞ āĻĒā§āϰāĻĻāĻžāύāĻ•āĻžāϰ⧀ āĻĒā§āϰāĻĢ⧇āĻļāύāĻžāϞ āĻāϏāχāĻ“ āϏ⧇āĻŦāĻžāĨ¤ āĻ…āĻ°ā§āĻ—āĻžāύāĻŋāĻ• āĻŸā§āĻ°ā§āϝāĻžāĻĢāĻŋāĻ• āĻŦāĻžāĻĄāĻŧāĻžāύ, āϏāĻžāĻ°ā§āϚ āĻ°â€ā§āϝāĻžāĻ™ā§āĻ•āĻŋāĻ‚ āωāĻ¨ā§āύāϤ āĻ•āϰ⧁āύ āĻāĻŦāĻ‚ āφāĻŽāĻžāĻĻ⧇āϰ āĻĒā§āϰāĻŽāĻžāĻŖāĻŋāϤ āĻ•ā§ŒāĻļāϞ āĻĻāĻŋāϝāĻŧ⧇ āφāĻĒāύāĻžāϰ āĻŦā§āϝāĻŦāϏāĻž āĻŦ⧃āĻĻā§āϧāĻŋ āĻ•āϰ⧁āύāĨ¤', keywords: 'SEO services, search engine optimization, digital marketing, organic traffic', url: 'https://agency.com/seo-services', author: 'āĻĄāĻŋāϜāĻŋāϟāĻžāϞ āĻŽāĻžāĻ°ā§āϕ⧇āϟāĻŋāĻ‚ āϟāĻŋāĻŽ', ogTitle: 'Professional SEO Services - Boost Your Rankings', ogDescription: 'Get professional SEO services that deliver real results. Increase traffic and rankings with our proven optimization strategies.', ogImage: 'https://agency.com/images/seo-services.jpg', siteName: 'āĻĄāĻŋāϜāĻŋāϟāĻžāϞ āĻāĻœā§‡āĻ¨ā§āϏāĻŋ', twitterCardType: 'summary_large_image', twitterSite: '@digitalagency', schemaType: 'WebPage' }, 'local': { title: 'āĻĄāĻžāωāύāϟāĻžāωāύ⧇āϰ āϏ⧇āϰāĻž āĻĒāĻŋā§ŽāϜāĻž āϰ⧇āĻ¸ā§āϤ⧋āϰāĻžāρ | āĻŽāĻžāϰāĻŋāĻ“'s Pizzeria', description: 'āĻĒā§āϰāϤāĻŋāĻĻāĻŋāύ āϤāĻžāϜāĻž āϤ⧈āϰāĻŋ āĻĒā§āϰāĻ•ā§ƒāϤ āχāϤāĻžāϞāĻŋāϝāĻŧāĻžāύ āĻĒāĻŋā§ŽāϜāĻžāĨ¤ āĻĄāĻžāωāύāϟāĻžāωāύ⧇ āĻ…āĻŦāĻ¸ā§āĻĨāĻŋāϤ, āϏāĻĒā§āϤāĻžāĻšā§‡ ā§­ āĻĻāĻŋāύ āĻ–ā§‹āϞāĻžāĨ¤ āĻĄā§‡āϞāĻŋāĻ­āĻžāϰāĻŋāϰ āϜāĻ¨ā§āϝ āĻ…āύāϞāĻžāχāύ⧇ āĻ…āĻ°ā§āĻĄāĻžāϰ āĻ•āϰ⧁āύ āĻ…āĻĨāĻŦāĻž āφāĻŽāĻžāĻĻ⧇āϰ āφāϰāĻžāĻŽāĻĻāĻžāϝāĻŧāĻ• āϰ⧇āĻ¸ā§āϤ⧋āϰāĻžāρāϝāĻŧ āφāϏ⧁āύāĨ¤', keywords: 'pizza restaurant, Italian food, downtown dining, pizza delivery', url: 'https://mariospizza.com', author: 'Mario\'s Pizzeria', ogTitle: 'āĻĄāĻžāωāύāϟāĻžāωāύ⧇āϰ āϏ⧇āϰāĻž āĻĒāĻŋā§ŽāϜāĻž āϰ⧇āĻ¸ā§āϤ⧋āϰāĻžāρ', ogDescription: 'Authentic Italian pizza made fresh daily. Downtown location, open 7 days. Order online for delivery!', ogImage: 'https://mariospizza.com/images/pizza-hero.jpg', siteName: 'Mario\'s Pizzeria', twitterCardType: 'summary_large_image', twitterSite: '@mariospizza', schemaType: 'āĻ¸ā§āĻĨāĻžāύ⧀āϝāĻŧ āĻŦā§āϝāĻŦāϏāĻž' }, 'event': { title: 'āĻĄāĻŋāϜāĻŋāϟāĻžāϞ āĻŽāĻžāĻ°ā§āϕ⧇āϟāĻŋāĻ‚ āϏāĻžāĻŽāĻŋāϟ ⧍ā§Ļ⧍ā§Ģ - āχāĻ¨ā§āĻĄāĻžāĻ¸ā§āĻŸā§āϰāĻŋ āĻŦāĻŋāĻļ⧇āώāĻœā§āĻžāĻĻ⧇āϰ āĻĨ⧇āϕ⧇ āĻļāĻŋāϖ⧁āύ', description: 'āĻĄāĻŋāϜāĻŋāϟāĻžāϞ āĻŽāĻžāĻ°ā§āϕ⧇āϟāĻŋāĻ‚ āϏāĻžāĻŽāĻŋāϟ ⧍ā§Ļ⧍ā§Ģ-āĻ ā§Ģā§Ļā§Ļ+ āĻŽāĻžāĻ°ā§āϕ⧇āϟāĻžāϰāĻĻ⧇āϰ āϏāĻžāĻĨ⧇ āϝ⧋āĻ— āĻĻāĻŋāύāĨ¤ āĻĻ⧁āχ āĻĻāĻŋāύ⧇āϰ āĻāĻ•ā§āϏāĻĒāĻžāĻ°ā§āϟ āϏ⧇āĻļāύ, āύ⧇āϟāĻ“āϝāĻŧāĻžāĻ°ā§āĻ•āĻŋāĻ‚ āĻāĻŦāĻ‚ āϏāĻ°ā§āĻŦāĻļ⧇āώ āχāĻ¨ā§āĻĄāĻžāĻ¸ā§āĻŸā§āϰāĻŋ āχāύāϏāĻžāχāϟāϏāĨ¤ āĻāĻ–āύāχ āϰ⧇āϜāĻŋāĻ¸ā§āϟāĻžāϰ āĻ•āϰ⧁āύ!', keywords: 'digital marketing summit, marketing conference, industry experts, networking', url: 'https://marketingsummit.com/2025', author: 'āϏāĻžāĻŽāĻŋāϟ āφāϝāĻŧā§‹āϜāĻ•', ogTitle: 'Digital Marketing Summit 2025', ogDescription: 'Join 500+ marketers for two days of expert sessions and networking. Learn the latest digital marketing strategies and trends.', ogImage: 'https://marketingsummit.com/images/summit-2025.jpg', siteName: 'āĻŽāĻžāĻ°ā§āϕ⧇āϟāĻŋāĻ‚ āϏāĻžāĻŽāĻŋāϟ', twitterCardType: 'summary_large_image', twitterSite: '@marketingsummit', schemaType: 'Event' }, 'howto': { title: 'āωāĻ¨ā§āύāϤ āĻāϏāχāĻ“ āĻ°â€ā§āϝāĻžāĻ™ā§āĻ•āĻŋāĻ‚āϝāĻŧ⧇āϰ āϜāĻ¨ā§āϝ āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āĻ…āĻĒāϟāĻŋāĻŽāĻžāχāϜ āĻ•āϰāĻžāϰ āĻĒāĻĻā§āϧāϤāĻŋ', description: 'āωāĻ¨ā§āύāϤ āϏāĻžāĻ°ā§āϚ āχāĻžā§āϜāĻŋāύ āĻ°â€ā§āϝāĻžāĻ™ā§āĻ•āĻŋāĻ‚āϝāĻŧ⧇āϰ āϜāĻ¨ā§āϝ āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āĻ…āĻĒāϟāĻŋāĻŽāĻžāχāĻœā§‡āĻļāύ⧇āϰ āϧāĻžāĻĒ⧇ āϧāĻžāĻĒ⧇ āĻ—āĻžāχāĻĄāĨ¤ āϟāĻžāχāĻŸā§‡āϞ āĻŸā§āϝāĻžāϗ⧇āϰ āϏ⧇āϰāĻž āĻ…āύ⧁āĻļā§€āϞāύ, āĻŽā§‡āϟāĻž āĻŦāĻŋāĻŦāϰāĻŖ āϞ⧇āĻ–āĻž āĻāĻŦāĻ‚ āφāϰāĻ“ āĻ…āύ⧇āĻ• āĻ•āĻŋāϛ⧁ āĻļāĻŋāϖ⧁āύāĨ¤', keywords: 'meta tag optimization, SEO tutorial, search rankings, title tags', url: 'https://seoguide.com/optimize-meta-tags', author: 'āĻāϏāχāĻ“ āϟāĻŋāωāĻŸā§‹āϰāĻŋāϝāĻŧāĻžāϞ āϟāĻŋāĻŽ', ogTitle: 'āωāĻ¨ā§āύāϤ āĻāϏāχāĻ“āϰ āϜāĻ¨ā§āϝ āĻŽā§‡āϟāĻž āĻŸā§āϝāĻžāĻ— āĻ…āĻĒāϟāĻŋāĻŽāĻžāχāϜ āĻ•āϰāĻžāϰ āĻĒāĻĻā§āϧāϤāĻŋ', ogDescription: 'Complete step-by-step guide to meta tag optimization. Improve your search rankings with proven techniques and best practices.', ogImage: 'https://seoguide.com/images/meta-tags-tutorial.jpg', siteName: 'āĻāϏāχāĻ“ āĻ—āĻžāχāĻĄ', twitterCardType: 'summary_large_image', twitterSite: '@seoguide', schemaType: 'āϕ⧀āĻ­āĻžāĻŦ⧇ āĻ•āϰāĻŦ⧇āύ' } }; const sample = samples[sampleType]; if (!sample) return; // Fill basic fields document.getElementById('pageTitle').value = sample.title; document.getElementById('metaDescription').value = sample.description; document.getElementById('keywords').value = sample.keywords; document.getElementById('pageUrl').value = sample.url; document.getElementById('author').value = sample.author; // Fill social media fields if they exist if (document.getElementById('ogTitle')) { document.getElementById('ogTitle').value = sample.ogTitle; document.getElementById('ogDescription').value = sample.ogDescription; document.getElementById('ogImage').value = sample.ogImage; document.getElementById('siteName').value = sample.siteName; document.getElementById('twitterCardType').value = sample.twitterCardType; document.getElementById('twitterSite').value = sample.twitterSite; } // Update schema type if in schema tab if (document.getElementById('schemaType')) { document.getElementById('schemaType').value = sample.schemaType; updateSchemaFields(); } // Update character counts and previews updateCharCount('pageTitle', 'title-count', 60, 100); updateCharCount('metaDescription', 'desc-count', 160, 300); updatePreviews(); // Smooth scroll to action button document.querySelector('.btn').scrollIntoView({ behavior: 'smooth', block: 'center' }); showNotification(`${sampleType.charAt(0).toUpperCase() + sampleType.slice(1)} template loaded!`, 'success'); } // ========== UTILITY FUNCTIONS ========== function escapeHtml(text) { const div = document.createElement('div'); div.textContent = text; return div.innerHTML; } // Copy to clipboard function copyToClipboard(elementId) { const element = document.getElementById(elementId); const text = element.textContent; navigator.clipboard.writeText(text).then(() => { showNotification('Copied to clipboard!', 'success'); }).catch(() => { // Fallback for older browsers const textArea = document.createElement('textarea'); textArea.value = text; document.body.appendChild(textArea); textArea.select(); document.execCommand('copy'); document.body.removeChild(textArea); showNotification('Copied to clipboard!', 'success'); }); } // Show error function showError(elementId, message) { const errorElement = document.getElementById(elementId); if (errorElement) { errorElement.textContent = message; } } // Clear errors function clearErrors() { document.querySelectorAll('.error').forEach(el => el.textContent = ''); } // Show notification toast function showNotification(message, type = 'success') { const toast = document.createElement('div'); toast.className = `toast ${type}`; toast.textContent = message; document.body.appendChild(toast); setTimeout(() => { toast.remove(); }, 3000); } // Analytics tracking function trackEvent(eventName, data = {}) { if (typeof gtag !== 'undefined') { gtag('event', eventName, { 'event_category': TOOL_CONFIG.category, 'event_label': TOOL_CONFIG.name, ...data }); } } // ========== AI ASSISTANT FUNCTIONS ========== // AI ëǍë‹Ŧ 뗴揰 function openAIModal() { const modal = document.getElementById('aiModal'); modal.classList.add('show'); // 현ėžŦ ėƒíƒœė— 따ëŧ ė ė ˆí•œ 화면 í‘œė‹œ if (aiModalState.apiKey && aiModalState.currentView === 'gemini') { showGeminiChat(); } else { showAISelector(); } updateAPIKeyStatus(); } // AI ëǍë‹Ŧ ë‹Ģ기 function closeAIModal() { const modal = document.getElementById('aiModal'); modal.classList.remove('show'); // 300ms 후 ėƒíƒœ ëĻŦė…‹ (ė• ë‹ˆëŠ”ė´ė…˜ ė™„ëŖŒ 후) setTimeout(() => { aiModalState.currentView = 'selector'; showAISelector(); }, 300); } // AI ė„ íƒ 화면 í‘œė‹œ function showAISelector() { document.getElementById('aiModalTitle').textContent = 'Choose Your AI Assistant'; document.getElementById('aiSelector').style.display = 'flex'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'selector'; } // Gemini ėą„íŒ… 화면 í‘œė‹œ function showGeminiChat() { document.getElementById('aiModalTitle').innerHTML = '✨ Gemini AI Assistant'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'flex'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'gemini'; // 봈揰 ëŠ”ė‹œė§€ę°€ ė—†ėœŧ늴 ėļ”ę°€ const chatMessages = document.getElementById('chatMessages'); if (!chatMessages.innerHTML.trim()) { addMessage('assistant', `Hello! I can help you with: â€ĸ Meta tag optimization strategies â€ĸ SEO best practices for 2025 â€ĸ Open Graph and Twitter Cards setup â€ĸ Schema markup implementation â€ĸ Character limits and SERP previews â€ĸ Bulk generation techniques What would you like to know about meta tag optimization?`); } } // API 키 네렕 화면 í‘œė‹œ function showAPIKeySetup() { document.getElementById('aiModalTitle').textContent = 'āĻœā§‡āĻŽāĻŋāύāĻŋ āĻāĻĒāĻŋāφāχ āϏ⧇āϟāφāĻĒ'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'block'; aiModalState.currentView = 'setup'; } // AI ė„ íƒ 래ëĻŦ function selectAI(aiType) { switch(aiType) { case 'chatgpt': const toolContext = `I need help with meta tag optimization and SEO. I'm using a meta tag generator tool that creates HTML meta tags, Open Graph tags, Twitter Cards, and Schema markup. Please help me optimize my meta tags for better search engine rankings and social media sharing.`; const chatUrl = `https://chat.openai.com/?q=${encodeURIComponent(toolContext)}`; window.open(chatUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'chatgpt' }); break; case 'claude': const claudeContext = `I need help with meta tag optimization and SEO. I'm using a meta tag generator tool that creates HTML meta tags, Open Graph tags, Twitter Cards, and Schema markup. Please help me optimize my meta tags for better search engine rankings and social media sharing.`; const claudeUrl = `https://claude.ai/chat?q=${encodeURIComponent(claudeContext)}`; window.open(claudeUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'claude' }); break; case 'gemini': if (!aiModalState.apiKey) { showAPIKeySetup(); } else { showGeminiChat(); } trackEvent('ai_selection', { ai_type: 'gemini' }); break; } } // API 키 ė €ėžĨ function saveGeminiApiKey() { const apiKey = document.getElementById('geminiApiKeyInput').value.trim(); if (apiKey) { localStorage.setItem('geminiApiKey', apiKey); aiModalState.apiKey = apiKey; showGeminiChat(); updateAPIKeyStatus(); } else { alert('āĻĻāϝāĻŧāĻž āĻ•āϰ⧇ āĻāĻ•āϟāĻŋ āĻŦ⧈āϧ āĻāĻĒāĻŋāφāχ āϕ⧀ āĻĒā§āϰāĻŦ⧇āĻļ āĻ•āϰāĻžāύ'); } } // API 키 ėƒíƒœ ė—…ë°ė´íŠ¸ function updateAPIKeyStatus() { const statusEl = document.getElementById('apiKeyStatus'); if (aiModalState.apiKey) { statusEl.innerHTML = 'āĻāĻĒāĻŋāφāχ āϕ⧀ āĻĒāϰāĻŋāĻŦāĻ°ā§āϤāύ āĻ•āϰ⧁āύ'; } else { statusEl.textContent = 'āϕ⧋āύ⧋ āĻāĻĒāĻŋāφāχ āϕ⧀ āϏ⧇āϟ āĻ•āϰāĻž āύ⧇āχ'; } } // ėą„íŒ… ëŠ”ė‹œė§€ ėļ”ę°€ function addMessage(type, content) { const chatMessages = document.getElementById('chatMessages'); const messageDiv = document.createElement('div'); messageDiv.className = `message ${type}`; if (type === 'user') { messageDiv.innerHTML = `You: ${content}`; } else { messageDiv.innerHTML = `✨ Gemini:
${content.replace(/\n/g, '
')}`; } chatMessages.appendChild(messageDiv); chatMessages.scrollTop = chatMessages.scrollHeight; } // Gemini뗐 ëŠ”ė‹œė§€ ė „ė†Ą async function sendToGemini() { const input = document.getElementById('geminiInput'); const message = input.value.trim(); if (!message) return; // ė‚ŦėšŠėž ëŠ”ė‹œė§€ ėļ”ę°€ addMessage('user', message); input.value = ''; // 로딩 í‘œė‹œ const loadingMsg = document.createElement('div'); loadingMsg.className = 'message assistant'; loadingMsg.innerHTML = '✨ Gemini:
Thinking...'; loadingMsg.id = 'loading-message'; document.getElementById('chatMessages').appendChild(loadingMsg); try { const currentData = getCurrentFormData(); const contextPrompt = `Context: User is using a meta tag generator tool. Current form data: ${JSON.stringify(currentData, null, 2)} Meta tag optimization knowledge: - Title tags should be 50-60 characters for optimal display - Meta descriptions should be 150-160 characters - Open Graph images should be 1200x630 pixels - Schema markup helps with rich snippets - Twitter Cards improve social sharing User question: ${message} Please provide helpful advice about meta tag optimization, SEO best practices, or how to improve their current meta tags.`; const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${aiModalState.apiKey}`, { method: 'āĻĒā§‹āĻ¸ā§āϟ', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: contextPrompt }] }], generationConfig: { temperature: 0.7, maxOutputTokens: 1000 } }) }); const data = await response.json(); // 로딩 ëŠ”ė‹œė§€ ė œęą° document.getElementById('loading-message').remove(); if (data.candidates && data.candidates[0] && data.candidates[0].content) { const reply = data.candidates[0].content.parts[0].text; addMessage('assistant', reply); } else { addMessage('assistant', 'Sorry, I could not generate a response. Please try again.'); } } catch (error) { // 로딩 ëŠ”ė‹œė§€ ė œęą° document.getElementById('loading-message')?.remove(); if (error.message.includes('āĻāĻĒāĻŋāφāχ āϕ⧀')) { addMessage('error', 'Invalid API key. Please check your API key and try again.'); showAPIKeySetup(); } else { addMessage('error', 'Failed to connect to Gemini. Please check your internet connection and try again.'); } } } function getCurrentFormData() { return { title: document.getElementById('pageTitle')?.value || '', description: document.getElementById('metaDescription')?.value || '', url: document.getElementById('pageUrl')?.value || '', keywords: document.getElementById('keywords')?.value || '', author: document.getElementById('author')?.value || '', language: document.getElementById('language')?.value || '', ogTitle: document.getElementById('ogTitle')?.value || '', ogDescription: document.getElementById('ogDescription')?.value || '', ogImage: document.getElementById('ogImage')?.value || '', siteName: document.getElementById('siteName')?.value || '', schemaType: document.getElementById('schemaType')?.value || '' }; } // ========== EVENT LISTENERS ========== // Enter key support for inputs document.addEventListener('āĻĄāĻŽāĻ•āύāĻŸā§‡āĻ¨ā§āϟāϞ⧋āĻĄā§‡āĻĄ', function() { // Character count listeners document.getElementById('pageTitle').addEventListener('input', () => updateCharCount('pageTitle', 'title-count', 60, 100)); document.getElementById('metaDescription').addEventListener('input', () => updateCharCount('metaDescription', 'desc-count', 160, 300)); // Clear errors on input document.querySelectorAll('.input-field').forEach(input => { input.addEventListener('input', clearErrors); }); // AI 버íŠŧ ė´ë˛¤íŠ¸ document.getElementById('aiBtn').addEventListener('click', openAIModal); // ëǍë‹Ŧ 뙏ëļ€ í´ëĻ­ė‹œ ë‹Ģ기 document.getElementById('aiModal').addEventListener('click', function(e) { if (e.target === this) { closeAIModal(); } }); // ė—”í„° 키 맀뛐 및 ESC 키로 ëǍë‹Ŧ ë‹Ģ기 document.addEventListener('keydown', function(e) { if (e.key === 'āĻāĻ¨ā§āϟāĻžāϰ') { const geminiInput = document.getElementById('geminiInput'); if (document.activeElement === geminiInput) { sendToGemini(); } } // ESC 키로 ëǍë‹Ŧ ë‹Ģ기 if (e.key === 'āĻāĻ¸ā§āϕ⧇āĻĒ') { closeAIModal(); } }); // 봈揰 API 키 ėƒíƒœ ė—…ë°ė´íŠ¸ updateAPIKeyStatus(); updateCurrentYear(); updateToolCount(); // Initialize schema fields updateSchemaFields(); }); // Track tool usage document.querySelectorAll('a[href*="wia"]').forEach(link => { link.addEventListener('click', function() { trackEvent('wia_link_click', { link: link.textContent }); }); }); // ========== DYNAMIC TOOL COUNT ========== // Update tool count dynamically async function updateToolCount() { try { const response = await fetch('/api/tool-count.php'); const data = await response.json(); // Update dynamic tools description document.querySelectorAll('.dynamic-tools-count').forEach(el => { el.textContent = `${data.count}+ free online tools in 206 languages. No signup, no fees, just tools that work.`; }); // Update "All X+ Tools" links document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${data.count}+ ${suffix}`; }); } catch (error) { // Fallback: use current actual count from server const fallbackCount = 333; document.querySelectorAll('.dynamic-tools-count').forEach(el => { el.textContent = `${fallbackCount}+ free online tools in 206 languages. No signup, no fees, just tools that work.`; }); document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${fallbackCount}+ ${suffix}`; }); console.log('Tool count API not available, using current count:', fallbackCount); } } // Update current year dynamically function updateCurrentYear() { const currentYear = new Date().getFullYear(); document.querySelectorAll('.current-year').forEach(el => { el.textContent = currentYear; }); } // ========== ANALYTICS ========== // Google Analytics window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXXXX'); // Track page view trackEvent('page_view', { tool: TOOL_CONFIG.name, category: TOOL_CONFIG.category });