{ const checkout = event?.data.checkout let items = [] event.data.checkout.lineItems checkout.lineItems.forEach(function (lineItem ) { items.push({name: lineItem.title, amount: lineItem.finalLinePrice.amount, currency: lineItem.finalLinePrice.currencyCode}) }) const customer = event?.data.checkout.order?.customer window._upf.push([ 'order', { order_id: checkout.order?.id, // required order_name: '#'+checkout.order.id, // required amount: checkout.subtotalPrice.amount, // required currency: checkout.subtotalPrice.currencyCode, // required, items: items, customer: { customer_id: customer.id, first_name: customer.firstName, last_name: customer.lastName, email: customer.email, } } ]); }); });})(self.webPixelsManager.createShopifyExtend('49611004', 'custom'));