Download the free ebook on Best Practices in Predictive Analytics for CFOs. Just fill out this short form
// Function to get the referral name from the URL
function getReferralFromURL() {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get('ref'); // Extracts "ref" parameter
}
// Auto-fill the hidden referral field if ref exists in URL
window.onload = function() {
const referralField = document.querySelector('input[name="ref"]');
if (referralField) {
const refValue = getReferralFromURL();
if (refValue) {
referralField.value = refValue;
}
}
};