рдореЗрдЯрд╛ рдЯреИрдЧ рдЬрдирд░реЗрдЯрд░ 2025

рдПрдЖрдИ рд╕рд╣рд╛рдпрддрд╛ рдХреЗ рд╕рд╛рде рд╕рдВрдкреВрд░реНрдг рдПрд╕рдИрдУ рдореЗрдЯрд╛ рдЯреИрдЧ рдЬрдирд░реЗрдЯрд░ред рд░реАрдпрд▓-рдЯрд╛рдЗрдо рдкреНрд░реАрд╡реНрдпреВ рдФрд░ рдХреИрд░реЗрдХреНрдЯрд░ рд╡реИрд▓рд┐рдбреЗрд╢рди рдХреЗ рд╕рд╛рде рдЕрдиреБрдХреВрд▓рд┐рдд рдореЗрдЯрд╛ рдЯрд╛рдЗрдЯрд▓, рд╡рд┐рд╡рд░рдг, рдУрдкрди рдЧреНрд░рд╛рдл рдЯреИрдЧ, рдЯреНрд╡рд┐рдЯрд░ рдХрд╛рд░реНрдбреНрд╕ рдФрд░ рд╕реНрдХреАрдорд╛ рдорд╛рд░реНрдХрдЕрдк рдмрдирд╛рдПрдВред

ЁЯФН рд╕рд░реНрдЪ рд░рд┐рдЬрд▓реНрдЯ рдкреНрд░реАрд╡реНрдпреВ

рдЖрдкрдХрд╛ рдкреЗрдЬ рд╢реАрд░реНрд╖рдХ рдпрд╣рд╛рдБ рджрд┐рдЦрд╛рдИ рджреЗрдЧрд╛
https://example.com/page
рдЖрдкрдХрд╛ рдореЗрдЯрд╛ рд╡рд┐рд╡рд░рдг рдпрд╣рд╛рдБ рджрд┐рдЦрд╛рдИ рджреЗрдЧрд╛ рдЬреЛ рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛рдУрдВ рдХреЛ рдЖрдкрдХреА рдкреЗрдЬ рд╕рд╛рдордЧреНрд░реА рдХрд╛ рдкреНрд░реАрд╡реНрдпреВ рджреЗрдЧрд╛ред

ЁЯУ▒ рдореЛрдмрд╛рдЗрд▓ рдкреНрд░реАрд╡реНрдпреВ

рдЖрдкрдХрд╛ рдкреЗрдЬ рд╢реАрд░реНрд╖рдХ...
https://example.com/page
рдЖрдкрдХрд╛ рдореЗрдЯрд╛ рд╡рд┐рд╡рд░рдг...

ЁЯУШ рдУрдкрди рдЧреНрд░рд╛рдл (рдлреЗрд╕рдмреБрдХ, рд▓рд┐рдВрдХреНрдбрдЗрди)

ЁЯРж рдЯреНрд╡рд┐рдЯрд░ рдХрд╛рд░реНрдбреНрд╕

ЁЯУШ рдлреЗрд╕рдмреБрдХ рдкреНрд░реАрд╡реНрдпреВ

рдЫрд╡рд┐ рдкреНрд░реАрд╡реНрдпреВ (1200x630px)
рдЖрдкрдХрд╛ рдУрдЬреА рд╢реАрд░реНрд╖рдХ
рдПрдЧреНрдЬрд╛рдореНрдкрд▓.рдХреЙрдо
рдЖрдкрдХрд╛ рдУрдЬреА рд╡рд┐рд╡рд░рдг рдпрд╣рд╛рдВ рджрд┐рдЦрд╛рдИ рджреЗрдЧрд╛ред

ЁЯРж рдЯреНрд╡рд┐рдЯрд░ рдкреВрд░реНрд╡рд╛рд╡рд▓реЛрдХрди

рдЯреНрд╡рд┐рдЯрд░ рдХрд╛рд░реНрдб рдЫрд╡рд┐
рдЖрдкрдХрд╛ рдЯреНрд╡рд┐рдЯрд░ рд╢реАрд░реНрд╖рдХ
рдЖрдкрдХрд╛ рдЯреНрд╡рд┐рдЯрд░ рд╡рд┐рд╡рд░рдгред
@рдЖрдкрдХрд╛рд╣реИрдВрдбрд▓

ЁЯУК рд╕реНрдХреАрдорд╛ рдорд╛рд░реНрдХрдЕрдк рдЬрдирд░реЗрдЯрд░

ЁЯУК рд╕реНрдХреАрдорд╛ рдкреВрд░реНрд╡рд╛рд╡рд▓реЛрдХрди

рд░рд┐рдЪ рд░рд┐рдЬрд▓реНрдЯреНрд╕ рдкреВрд░реНрд╡рд╛рд╡рд▓реЛрдХрди
рдкреВрд░реНрд╡рд╛рд╡рд▓реЛрдХрди рджреЗрдЦрдиреЗ рдХреЗ рд▓рд┐рдП рд╕реНрдХреАрдорд╛ рдкреНрд░рдХрд╛рд░ рдЪреБрдиреЗрдВ рдФрд░ рдлрд╝реАрд▓реНрдб рднрд░реЗрдВ

ЁЯФН рд╕реНрдХреАрдорд╛ рд╕рддреНрдпрд╛рдкрди

рдЗрди рдЖрдзрд┐рдХрд╛рд░рд┐рдХ рдЯреВрд▓реНрд╕ рд╕реЗ рдЕрдкрдиреЗ рдЬрдирд░реЗрдЯ рдХрд┐рдП рдЧрдП рд╕реНрдХреАрдорд╛ рдорд╛рд░реНрдХрдЕрдк рдХрд╛ рдкрд░реАрдХреНрд╖рдг рдХрд░реЗрдВ

тЪб рдмрд▓реНрдХ рдореЗрдЯрд╛ рдЯреИрдЧ рдЬрдирд░реЗрд╢рди

рдПрдХ рд╕рд╛рде рдХрдИ рдкреЗрдЬреЛрдВ рдХреЗ рд▓рд┐рдП рдореЗрдЯрд╛ рдЯреИрдЧ рдЬрдирд░реЗрдЯ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдЕрдкрдиреЗ рдкреЗрдЬ рдбреЗрдЯрд╛ рдХреЗ рд╕рд╛рде 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 тЬи

рдбреНрд░реЛрдиуГ╗рд░реЛрдмреЛрдЯ рдбрд┐рд▓реАрд╡рд░реА, рд╕реНрд╡рд╛рдпрддреНрдд рдбреНрд░рд╛рдЗрд╡рд┐рдВрдЧ, рдЖрдкрд╛рддрдХрд╛рд▓реАрди рдмрдЪрд╛рд╡ рдФрд░ рдмрд╣реБрдд рдХреБрдЫ - рдЕрдкрдиреЗ рджреЗрд╢ рдХреЗ рд▓рд┐рдП 30 рджрд┐рдиреЛрдВ рдореЗрдВ рднрд╡рд┐рд╖реНрдп рдХрд╛ рдЕрдиреБрднрд╡ рдХрд░реЗрдВ, рдкреВрд░реА рддрд░рд╣ рд╕реЗ рдореБрдлреНрдд!

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('CSV рдлрд╝рд╛рдЗрд▓ рдореЗрдВ рдХреЛрдИ рд╡реИрдз рдбреЗрдЯрд╛ рдирд╣реАрдВ рдорд┐рд▓рд╛', '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('рдХреГрдкрдпрд╛ рдкрд╣рд▓реЗ CSV рдлрд╝рд╛рдЗрд▓ рдЕрдкрд▓реЛрдб рдХрд░реЗрдВ', '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: '2025 рдореЗрдВ рдореЗрдЯрд╛ рдЯреИрдЧреНрд╕ рдХреА рд╕рдВрдкреВрд░реНрдг рдЧрд╛рдЗрдб: рдПрд╕рдИрдУ рд╕рд░реНрд╡реЛрддреНрддрдо рдкреНрд░рдерд╛рдПрдВ', description: 'рдЬрд╛рдиреЗрдВ рдХрд┐ рдХреИрд╕реЗ рдЕрдиреБрдХреВрд▓рд┐рдд рдореЗрдЯрд╛ рдЯреИрдЧ рдмрдирд╛рдПрдВ рдЬреЛ рдЦреЛрдЬ рд░реИрдВрдХрд┐рдВрдЧ рдФрд░ рдХреНрд▓рд┐рдХ-рдереНрд░реВ рджрд░ рдореЗрдВ рд╕реБрдзрд╛рд░ рдХрд░рддреЗ рд╣реИрдВред рдЙрджрд╛рд╣рд░рдг, рдЯреВрд▓реНрд╕ рдФрд░ рдмреЗрд╣рддрд░ рдПрд╕рдИрдУ рдХреЗ рд▓рд┐рдП 2025 рдХреА рд╕рд░реНрд╡реЛрддреНрддрдо рдкреНрд░рдерд╛рдПрдВ рд╢рд╛рдорд┐рд▓ рд╣реИрдВред', 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: 'рдкреНрд░реАрдорд┐рдпрдо рд╡рд╛рдпрд░рд▓реЗрд╕ рд╣реЗрдбрдлреЛрди рдПрдХреНрдЯрд┐рд╡ рдиреЙрдЗрдЬ рдХреИрдВрд╕рд▓рд┐рдВрдЧ, 30 рдШрдВрдЯреЗ рдХреА рдмреИрдЯрд░реА рд▓рд╛рдЗрдл рдФрд░ рдмреЗрд╣рддрд░реАрди рд╕рд╛рдЙрдВрдб рдХреНрд╡рд╛рд▓рд┐рдЯреА рдХреЗ рд╕рд╛рдеред рдореБрдлреНрдд рд╢рд┐рдкрд┐рдВрдЧ рдФрд░ 2 рд╕рд╛рд▓ рдХреА рд╡рд╛рд░рдВрдЯреА рд╢рд╛рдорд┐рд▓ред', 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: 'рдбрд┐рдЬрд┐рдЯрд▓ рдорд╛рд░реНрдХреЗрдЯрд┐рдВрдЧ рд╕рдорд┐рдЯ 2025 - рдЙрджреНрдпреЛрдЧ рд╡рд┐рд╢реЗрд╖рдЬреНрдЮреЛрдВ рд╕реЗ рд╕реАрдЦреЗрдВ', description: 'рдбрд┐рдЬрд┐рдЯрд▓ рдорд╛рд░реНрдХреЗрдЯрд┐рдВрдЧ рд╕рдорд┐рдЯ 2025 рдореЗрдВ 500+ рдорд╛рд░реНрдХреЗрдЯрд░реНрд╕ рдХреЗ рд╕рд╛рде рдЬреБрдбрд╝реЗрдВред рд╡рд┐рд╢реЗрд╖рдЬреНрдЮ рд╕рддреНрд░реЛрдВ, рдиреЗрдЯрд╡рд░реНрдХрд┐рдВрдЧ рдФрд░ рдирд╡реАрдирддрдо рдЙрджреНрдпреЛрдЧ рдЕрдВрддрд░реНрджреГрд╖реНрдЯрд┐ рдХреЗ рджреЛ рджрд┐рдиред рдЕрднреА рд░рдЬрд┐рд╕реНрдЯрд░ рдХрд░реЗрдВ!', 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 = 'API рдХреБрдВрдЬреА рдмрджрд▓реЗрдВ'; } 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 });