const script = document.createElement('script'); script.setAttribute('src', 'https://apis.google.com/js/platform.js?onload=renderOptIn'); script.setAttribute('async', ''); document.head.appendChild(script); window.renderOptIn = function() { window.gapi.load('surveyoptin', function() { window.gapi.surveyoptin.render( { // REQUIRED FIELDS "merchant_id": 559093401, "order_id": "ORDER_ID", "email": "CUSTOMER_EMAIL", "delivery_country": "COUNTRY_CODE", "estimated_delivery_date": "YYYY-MM-DD", // OPTIONAL FIELDS "products": [{"gtin":"GTIN1"}, {"gtin":"GTIN2"}] }); }); } // Step 2. Subscribe to customer events with analytics.subscribe(), and add tracking // analytics.subscribe("all_standard_events", event => { // console.log("Event data ", event?.data); // }); });})(self.webPixelsManager.createShopifyExtend('44859459', 'custom'));