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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -