Created
April 1, 2020 01:20
-
-
Save mafellows/10f3f199e52e55b7be563228f66a553e 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 type="text/javascript"> | |
!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', '2040485802644853'); | |
window.addEventListener(WebPlatform.Events.WEBSITE_SUBSCRIBED, function(event) { | |
// event.detail.extra holds the subscription amount, "15.50" for $15.50 subscription | |
fbq('track', 'Purchase', {currency: "USD", value: event.detail.extra.amount}) | |
}); window.addEventListener(WebPlatform.Events.NEW_REGISTRATION, function(event) { | |
fbq('track', 'Lead'); | |
}); window.addEventListener(WebPlatform.Events.PAGE_LOADED , function(event) { }); window.addEventListener(WebPlatform.Events.WEBSITE_CANCELED, function(event) { }); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment