const urlParams = new URLSearchParams(window.location.search); const utm = urlParams.get("loc"); // Function to extract the subdomain from the current URL function getSubdomain() { const host = window.location.hostname; const parts = host.split('.'); if (parts.length > 2) { // Assuming the subdomain is the first part of the hostname return parts.slice(0, parts.length - 2).join('.'); } return null; } const domain = getSubdomain(); if (utm == "__PLACEMENT__") { // Add any additional logic here if needed } else { window.location.href = "https://sephoravoucher.funnelish.com/2"; }