Created
April 5, 2024 17:40
-
-
Save guaracyalima/09a237f4d783bb54edc323e70b2c47b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ftx() { | |
console.log( | |
"%cAdvanced Tracking © 2024 all rights reserved \n Instagram https://www.instagram.com/ke.advancedtracking/ \n WhatsApp.: https://api.whatsapp.com/send?phone=556196288506&text=Olá%20pessoal%20da%20Advanced%20Tracking \nAcesse nosso site: www.advancedtraking.com.br", | |
"font-size:20px;color:green;" | |
); | |
setTimeout(() => { | |
let cta = document.getElementById("bt_pre_cta"); | |
if (cta != null || cta != undefined) { | |
document | |
.getElementById("bt_pre_cta") | |
.setAttribute("onClick", "getDataForm()"); | |
console.log("added attribute"); | |
} | |
}, 3000); | |
} | |
ftx(); | |
function setGl() { | |
function getCookie(name) { | |
var nameEQ = name + "="; | |
var ca = document.cookie.split(";"); | |
for (var i = 0; i < ca.length; i++) { | |
var c = ca[i]; | |
while (c.charAt(0) == " ") c = c.substring(1, c.length); | |
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); | |
} | |
return null; | |
} | |
function changeCookie() { | |
var gaValue = getCookie("_ga"); | |
var gaX5Value = getCookie("_ga_FD7ELKM2VM"); | |
if (gaValue && gaX5Value) { | |
var a = gaValue.substr(6); | |
var b = gaX5Value.substr(6); | |
var biscuit = window.google_tag_data.glBridge.generate({ | |
_ga: a, | |
_ga_FD7ELKM2VM: b, | |
}); | |
return biscuit; | |
} | |
} | |
changeCookie(); | |
document | |
.getElementById("form-field-cross") | |
.setAttribute("value", changeCookie()); | |
} | |
function getDataForm() { | |
setTimeout(() => { | |
const utmParamQueryString = new URLSearchParams(window.location.search); | |
setGl(); | |
document | |
.getElementById("form-field-utm_hidden") | |
.setAttribute("value", `&${utmParamQueryString.toString()}`); | |
}, 3000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment