function MCSaveRefCode(){ // Get the current URL const currentURL = window.location.href; // Get the URL query parameters const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); // Check if a specific parameter exists const paramName = 'ref'; if (urlParams.has(paramName)) { const paramValue = urlParams.get(paramName); localStorage.setItem('ref',paramValue); } } MCSaveRefCode();