Untitled
unknown
plain_text
2 years ago
1.0 kB
59
Indexable
<script>
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
var coming_from = getCookie("coming_from");
if (coming_from === "fb") {
fbq('track', 'CompleteRegistration');
console.log("The 'coming_from' cookie exists and its value is 'fb'");
} else if (coming_from === "gg") {
//sua linha que inicia com "gtag" aqui embaixo
//a linha abaixo é apenas um exemplo. apague a linha abaixo e cole a linha da sua conta google ads
gtag('event', 'conversion', {'send_to': 'AW-01841292352/CvJeCARR7a0DEJGTrtIo'});
} else {
console.log("The 'coming_from' cookie either doesn't exist or its value is not 'fb'");
}
</script>Editor is loading...
Leave a Comment