javascript - Facebook Pixel ignoring 'AddToCart' event in click function -


i adding facebook pixel track events online shop. reason following code gives error on facebook's chrome extension:

enter image description here

the code used pretty simple:

$(document).ready(function() {     $('.add_to_cart_button').click(function() {         fbq('track', 'addtocart', {             content_ids: [ '56404', '48061', '56412' ],             content_type: 'product',             value: 48,             currency: 'eur'         });     }); }); 

when click event removed facebook chrome extension tracks 'addtocart' event ideally added on click of 'add cart' button not on load of page otherwise guess end incorrect data.

should ignore error or leave without click event?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -