📊 Email Tracking Pixel Generator

Generate pixel code to track email opens and clicks

HTML Pixel Code

Click Tracking Link Template

⚖️ Privacy & Compliance Notice:
  • Inform users that emails are tracked (GDPR requirement)
  • Add tracking disclaimer in email footer or privacy policy
  • Respect user privacy preferences and unsubscribe requests
  • Track only with explicit user consent in some jurisdictions
  • Combine with proper authentication (SPF, DKIM, DMARC)
✨ Tracking Methods:
  • IMG Tag: Traditional, widely supported, reliable
  • Beacon API: Modern, doesn't block page, best for pages
  • Fetch API: Flexible, requires JavaScript, good for web
  • Click Tracking: Redirect URLs to track link clicks
`; // Fetch API Code const fetchCode = ``; // Click tracking link const clickTrackCode = `https://tracking.example.com/click?campaign=${campaignId}&url=DESTINATION_URL`; document.getElementById('imgCode').textContent = imgCode; document.getElementById('beaconCode').textContent = beaconCode; document.getElementById('fetchCode').textContent = fetchCode; document.getElementById('clickTrackCode').textContent = clickTrackCode; document.getElementById('results').classList.add('show'); } function switchTab(tab) { const tabs = document.querySelectorAll('.tab-content'); tabs.forEach(t => t.classList.remove('active')); document.getElementById(tab).classList.add('active'); const buttons = document.querySelectorAll('.tab-btn'); buttons.forEach(b => b.classList.remove('active')); event.target.classList.add('active'); } function copyCode(elementId) { const text = document.getElementById(elementId).textContent; navigator.clipboard.writeText(text).then(() => { const btn = event.target; btn.textContent = '✓ Copied!'; btn.classList.add('copied'); setTimeout(() => { btn.textContent = 'Copy Code'; btn.classList.remove('copied'); }, 2000); }); } function clearForm() { document.getElementById('trackingUrl').value = ''; document.getElementById('campaignId').value = ''; document.getElementById('userId').value = ''; document.getElementById('pixelSize').value = '1x1'; document.getElementById('results').classList.remove('show'); }