Created
January 13, 2020 17:23
-
-
Save tallesairan/221ed94578b455d9dff14b1d628184bb to your computer and use it in GitHub Desktop.
bank billet pixel tracking for facebook
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
<!-- Facebook Pixel Code --> | |
<script> | |
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; | |
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; | |
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, | |
document,'script','https://connect.facebook.net/en_US/fbevents.js'); | |
fbq('init', 'PIXELID'); | |
fbq('track', 'PageView'); | |
fbq('track', 'Purchase', { | |
content_type: 'product', | |
content_ids: ['59535'], | |
payment_type: 'BILLET', | |
value: '196.42', | |
currency: 'BRL' | |
}); | |
fbq('trackCustom', 'payment_type', {value: 'BILLET'}); | |
</script> | |
<noscript> | |
<img height='1' width='1' style= 'display:none' src='https://www.facebook.com/tr?id=PIXELID&ev=Purchase&noscript=1&cd[value]=196.42&cd[currency]=BRL&cd[content_type]=product&cd[content_ids]=59535&cd[payment_type]=BILLET' /> | |
<img height='1' width='1' style= 'display:none' src='https://www.facebook.com/tr?id=PIXELID&ev=payment_type&cd[value]=BILLET&noscript=1' /> | |
</noscript> | |
<!-- End Facebook Pixel Code --> |
Depende do seu gateway de pagamento, você só troca billet por credit_card, qual gateway usa?
Estou usando o pagar.me. Tem só essas 2 opções, cartão e boleto. Os eventos do pixel estou criando no tag manager
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oi, como eu crio cartão e boleto dentro do payment_type? Para que o evento dispare cartão ou boleto de acordo com o método de pagamento usado? Obrigado