// Function to get URL parameters
function getQueryParam(param) {
let urlParams = new URLSearchParams(window.location.search);
return urlParams.get(param);
}
// Capture the 'referral' parameter
let referralLink = getQueryParam('referral');
// Use referralLink in other functions below