// Pass UTMs through to Jane App booking links, before the hash
document.querySelectorAll('a[href*="janeapp.com"]').forEach(link => {
const params = new URLSearchParams(window.location.search);
const utmKeys = ['utm_source','utm_medium','utm_campaign','utm_content','utm_term'];
const present = utmKeys.filter(k => params.has(k));
if (present.length === 0) return;
// Split href into base and hash so UTMs go in the right place
const [base, hash] = link.href.split('#');
const url = new URL(base);
present.forEach(k => url.searchParams.set(k, params.get(k)));
link.href = url.toString() + (hash ? '#' + hash : '');
});