' }); $("form").on('click','.purchase-details__buttons button[type="submit"]', function(e) { //alert($('#mypid').val()); var form = $(this).closest('form'), price = $(form).parent("div").data("product"), product_price = Shopify.formatMoney(price.price,form.parent("div").data('money-format')), product_title = price.title, product_id = $('#mypid').val(); fbq('track', 'AddToCart', { content_name: product_title, content_type: "product_group", value:product_price, currency: 'USD', content_ids: [product_id] }); }); });
Terms & Conditions