document.addEventListener('DOMContentLoaded', () => { const form = document.getElementById('signup'); if (!form) return; const keys = ['utm_source','utm_medium','utm_campaign','utm_term','utm_content']; keys.forEach(key => { const value = localStorage.getItem(key); if (value) { const input = form.querySelector(`input[name="${key}"]`); if (input) { input.value = value; console.log(`Set ${key} = ${value}`); } } }); });