Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathonbyrdziak/6b74f6f529fbfce8ff5657d0f9c81f68 to your computer and use it in GitHub Desktop.
Save jonathonbyrdziak/6b74f6f529fbfce8ff5657d0f9c81f68 to your computer and use it in GitHub Desktop.
Conversion Event Pixel for Clickfunnels
<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