(function(shopify) {shopify.extend('WebPixel::Render', function(api) { var analytics=api.analytics,browser=api.browser,init=api.init; // Step 1. Initialize the JavaScript pixel SDK (make sure to exclude HTML) // Step 2. Subscribe to customer events with analytics.subscribe(), and add tracking // analytics.subscribe("all_standard_events", event => { // console.log("Event data ", event?.data); // }); function checkScript() { if (!document.getElementById('unique-hyros-script-id')) { var head = document.head; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = "https://183376.t.hyros.com/v1/lst/universal-script?ph=9d08026b1ae1d326444a12ec683f2f93a86d94e32f19890c8e9d1f02c51c10e3&tag=!clicked&origin=SHOPIFY&ref_url=" + encodeURI(document.URL) ; head.appendChild(script); }} analytics.subscribe('checkout_contact_info_submitted', (event) => { const checkout = event.data.checkout; browser.cookie.set('hyrosemail', checkout.email); checkScript() }) analytics.subscribe('checkout_completed', (event) => { checkScript() }) analytics.subscribe('page_viewed', (event) => { checkScript() }) });})(self.webPixelsManager.createShopifyExtend('51478681', 'custom'));