(function(shopify) {shopify.extend('WebPixel::Render', function(api) { var analytics=api.analytics,browser=api.browser,init=api.init; // Step 1. Add and initialize your third-party JavaScript pixel (make sure to exclude HTML) // Step 2. Subscribe to customer events using the analytics.subscribe() API // analytics.subscribe("event_name", event => { // pixel("track", "event_name", event.data); // }); window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} var script = document.createElement("script"); script.async = true; script.src = "https://www.googletagmanager.com/gtag/js?id=AW-903272592"; document.head.appendChild(script); script.onload = () => { if (typeof gtag === 'function') { gtag('js', new Date()); gtag('config', 'AW-903272592'); setTimeout(function () { if (typeof window.Shopify === 'object' && typeof window.Shopify.checkout === 'object') { gtag('event', 'conversion', { 'send_to': 'AW-903272592/wn6GCJLywIMYEJCx264D', 'value': Shopify.checkout.total_price, 'currency': Shopify.checkout.presentment_currency, 'transaction_id': Shopify.checkout.order_id.toString() }); } }, 1500); } } });})(self.webPixelsManager.createShopifyExtend('11272371', 'custom'));