$(document).ready(function(){ const addToCForm = $('#add-to-cart-form') var _content_id = $('#az_reviews').data('product_id') var _value = $('[data-zp-product-discount-price]').html().replace('$', '') var _currency = Shopify.currency.active var _content_type = 'product_group' var _content_name = document.title var _content_category = 'Toothpaste' var _quantity = $('#zpproductselector4-quantity').val() $('#zpa-add-to-cart-btn').on('submit', function(){ fbq('track', 'AddToCart', { content_name: _content_name, content_category: _content_category, content_ids: _content_id, content_type: _content_type, value: _value, currency: _currency }); }, false) })