Created
August 9, 2017 20:49
-
-
Save lcrespilho/d3b5b7b8c645e81bb4c115bc4de1a55f 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
<script> | |
// verifica se tem o cookie da Natura | |
var racc_origin = document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*racc_origin\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1"); | |
// se origem de tráfego for Natura | |
if (racc_origin) { | |
var urlPixel = 'https://www.facebook.com/tr/?id=235391240155676&ev=PageView&dl=' + encodeURIComponent(document.location.href) + '&rl=' + encodeURIComponent(document.referrer) + '&if=false&ts=' + Date.now() + '&cd%5Bsite_name%5D=Geekie&v=2.7.19&ec=0&o=28'; | |
var pixel = document.createElement('img'); | |
pixel.width = '1'; | |
pixel.height = '1'; | |
pixel.style.display = 'none'; | |
pixel.src = urlPixel; | |
document.body.appendChild(pixel); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Local de instalação da tag
Em qualquer lugar do
<body>
da página; de preferência no topo.