document.addEventListener("DOMContentLoaded", function() { const params = new URLSearchParams(window.location.search); const utmFields = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term', 'gclid']; const utmHash = utmFields .filter(key => params.get(key)) .map(key => `${key}=${encodeURIComponent(params.get(key))}`) .join('&'); if (utmHash) { document.querySelectorAll('a[href*="typeform.com"]').forEach(link => { link.href = link.href.split('#')[0] + '#' + utmHash; }); } });