← Ana Sayfa

🏷️ Meta Tag Generator

SEO optimizasyonu için meta tagları, Open Graph, Twitter Cards ve JSON-LD structured data otomatik oluşturun.

Sayfa Bilgileri

Meta Tags

Meta tagları buraya gelecek...
Open Graph tagları buraya gelecek...
Twitter Card tagları buraya gelecek...
JSON-LD Schema markup buraya gelecek...
Tüm meta tagları buraya gelecek...
`; } function getSchemaType(contentType) { const types = { 'website': 'WebSite', 'article': 'Article', 'product': 'Product', 'profile': 'Person', 'video': 'VideoObject', 'music': 'MusicRecording' }; return types[contentType] || 'WebPage'; } async function generateWithAI() { const url = document.getElementById('aiUrl').value.trim(); if (!url) { showToast('Lütfen analiz edilecek URL\'yi girin!', 'error'); return; } const loadingEl = document.getElementById('aiLoading'); const errorEl = document.getElementById('aiError'); // Show loading, hide error loadingEl.style.display = 'flex'; errorEl.style.display = 'none'; try { const response = await fetch('https://us-central1-fuzl-io.cloudfunctions.net/generateMetaTags', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ url: url, title: document.getElementById('pageTitle').value.trim(), description: document.getElementById('metaDescription').value.trim(), keywords: document.getElementById('keywords').value.trim() }) }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); if (data.success && data.content) { // Parse AI response and fill form fields parseAIResponse(data.content); showToast('AI meta tagları oluşturdu!'); trackEvent('ai_meta_generated', url); } else { throw new Error('Invalid response from AI service'); } } catch (error) { console.error('AI meta generation error:', error); // Fallback: basic meta generation from URL console.log('Using fallback meta generation...'); const urlObj = new URL(url); const siteName = urlObj.hostname.replace('www.', ''); const title = `${siteName.charAt(0).toUpperCase() + siteName.slice(1)} - Ana Sayfa`; document.getElementById('pageUrl').value = url; document.getElementById('pageTitle').value = title; document.getElementById('siteName').value = siteName; document.getElementById('metaDescription').value = `${siteName} resmi web sitesi`; generateTags(); showToast('Basit meta tagları oluşturuldu!'); } finally { loadingEl.style.display = 'none'; } } function parseAIResponse(content) { // Try to extract structured data from AI response try { const jsonMatch = content.match(/\{[\s\S]*\}/); if (jsonMatch) { const data = JSON.parse(jsonMatch[0]); if (data.metaTags) { // Fill form with AI generated data fillFormFromAI(data); generateTags(); return; } } } catch (e) { console.log('Could not parse AI JSON, using text extraction'); } // Fallback: extract from text const lines = content.split('\n'); lines.forEach(line => { if (line.includes('title') && line.includes('content')) { const match = line.match(/content="([^"]+)"/); if (match) document.getElementById('pageTitle').value = match[1]; } if (line.includes('description') && line.includes('content')) { const match = line.match(/content="([^"]+)"/); if (match) document.getElementById('metaDescription').value = match[1]; } }); generateTags(); } function fillFormFromAI(data) { if (data.title) document.getElementById('pageTitle').value = data.title; if (data.description) document.getElementById('metaDescription').value = data.description; if (data.keywords) document.getElementById('keywords').value = data.keywords; if (data.siteName) document.getElementById('siteName').value = data.siteName; } function copyOutput() { const activeTab = document.querySelector('.tab-content.active .output-area'); const content = activeTab.textContent; if (!content || content.includes('buraya gelecek') || content.includes('doldurun')) { showToast('Kopyalanacak içerik yok!', 'error'); return; } navigator.clipboard.writeText(content).then(() => { showToast(`${currentTab.toUpperCase()} meta tagları kopyalandı!`); trackEvent('meta_tags_copied', currentTab); }); } function showToast(message, type = 'success') { const toast = document.getElementById('toast'); toast.textContent = message; toast.className = `toast ${type}`; toast.classList.add('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 }); } } // Initialize with example document.addEventListener('DOMContentLoaded', function() { document.getElementById('pageTitle').value = 'Fuzlio Studio - Yaratıcılık Araçları'; document.getElementById('metaDescription').value = 'Tasarımcılar ve geliştiriciler için ücretsiz yaratıcılık araçları. Logo maker, QR generator, color palette ve daha fazlası.'; document.getElementById('siteName').value = 'Fuzlio Studio'; document.getElementById('pageUrl').value = 'https://fuzlio.com'; document.getElementById('keywords').value = 'design tools, logo maker, qr generator, color palette, web tools'; generateTags(); }); // Track page view if (typeof gtag !== 'undefined') { gtag('event', 'page_view', { page_title: 'Meta Tag Generator', page_location: window.location.href, content_group1: 'Tools' }); }