Script - UTM Track

				
					<script>
	let prefix = ["https://payment.hotmart.com", "https://pay.hotmart.com", "https://pay.kiwify.com.br"];

	function getParams() {
		let t = "",
				e = window.top.location.href,
				r = new URL(e);
		if (null != r) {
			let a = r.searchParams.get("utm_source"),
					n = r.searchParams.get("utm_medium"),
					o = r.searchParams.get("utm_campaign"),
					m = r.searchParams.get("utm_term"),
					c = r.searchParams.get("utm_content"),
					rede = r.searchParams.get("rede"); - 1 !== e.indexOf("?") && (t = `&sck=${a}|${n}|${o}|${m}|${c}|${rede}`), 
						console.log(t = t.replaceAll("|null", "").replaceAll("null", "").replaceAll("=|", "=").replaceAll("|=", "="))
		}
		return t
	}! function() {
		var t = new URLSearchParams(window.location.search);
		t.toString() && document.querySelectorAll("a").forEach(function(e) {
			for (let r = 0; r < prefix.length; r++) - 1 !== e.href.indexOf(prefix[r]) && (-1 === e.href.indexOf("?") ? e.href += "?" + t.toString() + getParams() : e.href += "&" + t.toString() + getParams())
		})
	}();
</script>