← Ana Sayfa

🏷️ Meta Tag Generator

SEO meta tagları oluşturun! Open Graph, Twitter Cards, JSON-LD structured data ve daha fazlası için kapsamlı meta tag üretici.

Website Bilgileri

0/160 karakter

Meta Tag Seçenekleri

Title, description, keywords vb.
Facebook paylaşım meta tagları
Twitter paylaşım meta tagları
Structured data schema
Mobil uyumluluk meta tagları
Arama motoru direktifleri

Oluşturulan Meta Tags

`); } const output = document.getElementById('metaOutput'); output.textContent = metaTags.length > 0 ? metaTags.join('\n') : ''; updatePreview(data); } function updatePreview(data) { // Google Preview document.getElementById('googleUrl').textContent = data.url ? new URL(data.url).hostname : 'example.com'; document.getElementById('googleTitle').textContent = data.title || 'Site Başlığı'; document.getElementById('googleDescription').textContent = data.description || 'Site açıklaması burada görünecek...'; // Facebook Preview const facebookImage = document.getElementById('facebookImage'); if (data.image) { facebookImage.style.backgroundImage = `url(${data.image})`; facebookImage.style.backgroundSize = 'cover'; facebookImage.style.backgroundPosition = 'center'; facebookImage.textContent = ''; } else { facebookImage.style.backgroundImage = 'none'; facebookImage.textContent = 'Görsel yok'; } document.getElementById('facebookTitle').textContent = data.title || 'Site Başlığı'; document.getElementById('facebookDescription').textContent = data.description || 'Site açıklaması...'; document.getElementById('facebookUrl').textContent = data.url ? new URL(data.url).hostname.toUpperCase() : 'EXAMPLE.COM'; // Twitter Preview const twitterImage = document.getElementById('twitterImage'); if (data.image) { twitterImage.style.backgroundImage = `url(${data.image})`; twitterImage.style.backgroundSize = 'cover'; twitterImage.style.backgroundPosition = 'center'; twitterImage.textContent = ''; } else { twitterImage.style.backgroundImage = 'none'; twitterImage.textContent = 'Görsel yok'; } document.getElementById('twitterTitle').textContent = data.title || 'Site Başlığı'; document.getElementById('twitterDescription').textContent = data.description || 'Site açıklaması...'; document.getElementById('twitterUrl').textContent = data.url ? new URL(data.url).hostname : 'example.com'; } function copyMetaTags() { const output = document.getElementById('metaOutput').textContent; if (!output.trim() || output.includes('form alanlarını doldurun')) { showToast('Kopyalanacak meta tag yok!', 'error'); return; } navigator.clipboard.writeText(output).then(() => { showToast('Meta taglar kopyalandı!', 'success'); trackEvent('meta_tags_copied', 'clipboard'); }).catch(() => { showToast('Kopyalama başarısız!', 'error'); }); } function downloadMetaTags() { const output = document.getElementById('metaOutput').textContent; const title = document.getElementById('siteTitle').value || 'Website'; if (!output.trim() || output.includes('form alanlarını doldurun')) { showToast('İndirilecek meta tag yok!', 'error'); return; } const htmlContent = ` ${output} `; const blob = new Blob([htmlContent], { type: 'text/html' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `${title.toLowerCase().replace(/\s+/g, '-')}-meta-tags.html`; a.click(); URL.revokeObjectURL(url); showToast('HTML dosyası indirildi!', 'success'); trackEvent('meta_tags_downloaded', 'html'); } function previewSEO() { const previewSection = document.getElementById('previewSection'); const isVisible = previewSection.style.display !== 'none'; previewSection.style.display = isVisible ? 'none' : 'block'; const button = event.target; button.textContent = isVisible ? '👁️ SEO Önizleme' : '🙈 Önizlemeyi Gizle'; if (!isVisible) { previewSection.scrollIntoView({ behavior: 'smooth' }); trackEvent('seo_preview_viewed', 'preview'); } } function escapeHtml(text) { const div = document.createElement('div'); div.textContent = text; return div.innerHTML; } function showToast(message, type = 'success') { const toast = document.getElementById('toast'); toast.textContent = message; toast.className = `toast toast-${type} show`; setTimeout(() => { toast.classList.remove('show'); }, 3000); } function trackEvent(action, label) { if (typeof gtag !== 'undefined') { gtag('event', action, { 'tool_name': 'meta_tag_generator', 'event_label': label }); } } // Track page view if (typeof gtag !== 'undefined') { gtag('event', 'page_view', { page_title: 'Meta Tag Generator', page_location: window.location.href, content_group1: 'Tools' }); }