Created
May 29, 2020 15:40
-
-
Save jonathonbyrdziak/6b74f6f529fbfce8ff5657d0f9c81f68 to your computer and use it in GitHub Desktop.
Conversion Event Pixel for Clickfunnels
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> | |
var eventTotal = 0; | |
jQuery('.elOrderProductOptinPrice').each(function(k,v){ | |
v = jQuery(v); | |
var _str = v.text().replace('$',''); | |
var _num = parseFloat(_str,2); | |
eventTotal += _num; | |
}); | |
fbq('track', 'Purchase', { | |
value: eventTotal, | |
currency: 'usd', | |
}); | |
gtag('event', 'conversion', { | |
'send_to': 'AW-947852717/nH53CKjK2tEBEK2r_MMD', | |
'transaction_id': '', | |
'value': eventTotal, | |
'currency': 'USD' | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment