(function () { var customDocumentWrite = function(content) { var jquery = null; if (window.jQuery) { jquery = window.jQuery; } else if (window.Checkout && window.Checkout.$) { jquery = window.Checkout.$; } if (jquery) { jquery('body').append(content); } }; var hasLoggedConversion = function(token) { if (token) { return document.cookie.indexOf('loggedConversion=' + token) !== -1; } return false; } var setCookieIfConversion = function(token) { if (token) { var twoMonthsFromNow = new Date(Date.now()); twoMonthsFromNow.setMonth(twoMonthsFromNow.getMonth() + 2); document.cookie = 'loggedConversion=' + token + '; expires=' + twoMonthsFromNow; } } var trekkie = window.ShopifyAnalytics.lib = window.trekkie = window.trekkie || []; if (trekkie.integrations) { return; } trekkie.methods = [ 'identify', 'page', 'ready', 'track', 'trackForm', 'trackLink' ]; trekkie.factory = function(method) { return function() { var args = Array.prototype.slice.call(arguments); args.unshift(method); trekkie.push(args); return trekkie; }; }; for (var i = 0; i < trekkie.methods.length; i++) { var key = trekkie.methods[i]; trekkie[key] = trekkie.factory(key); } trekkie.load = function(config) { trekkie.config = config || {}; trekkie.config.initialDocumentCookie = document.cookie; var first = document.getElementsByTagName('script')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.onerror = function(e) { var scriptFallback = document.createElement('script'); scriptFallback.type = 'text/javascript'; scriptFallback.onerror = function(error) { var Monorail = { produce: function produce(monorailDomain, schemaId, payload) { var currentMs = new Date().getTime(); var event = { schema_id: schemaId, payload: payload, metadata: { event_created_at_ms: currentMs, event_sent_at_ms: currentMs } }; return Monorail.sendRequest("https://" + monorailDomain + "/v1/produce", JSON.stringify(event)); }, sendRequest: function sendRequest(endpointUrl, payload) { // Try the sendBeacon API if (window && window.navigator && typeof window.navigator.sendBeacon === 'function' && typeof window.Blob === 'function' && !Monorail.isIos12()) { var blobData = new window.Blob([payload], { type: 'text/plain' }); if (window.navigator.sendBeacon(endpointUrl, blobData)) { return true; } // sendBeacon was not successful } // XHR beacon var xhr = new XMLHttpRequest(); try { xhr.open('POST', endpointUrl); xhr.setRequestHeader('Content-Type', 'text/plain'); xhr.send(payload); } catch (e) { console.log(e); } return false; }, isIos12: function isIos12() { return window.navigator.userAgent.lastIndexOf('iPhone; CPU iPhone OS 12_') !== -1 || window.navigator.userAgent.lastIndexOf('iPad; CPU OS 12_') !== -1; } }; Monorail.produce('monorail-edge.shopifysvc.com', 'trekkie_storefront_load_errors/1.1', {shop_id: 26967002, theme_id: 126792663093, app_name: "storefront", context_url: window.location.href, source_url: "//olivias.com/cdn/s/trekkie.storefront.f2da2901761ed691d459433ada0e4d90e085713c.min.js"}); }; scriptFallback.async = true; scriptFallback.src = '//olivias.com/cdn/s/trekkie.storefront.f2da2901761ed691d459433ada0e4d90e085713c.min.js'; first.parentNode.insertBefore(scriptFallback, first); }; script.async = true; script.src = '//olivias.com/cdn/s/trekkie.storefront.f2da2901761ed691d459433ada0e4d90e085713c.min.js'; first.parentNode.insertBefore(script, first); }; trekkie.load( {"Trekkie":{"appName":"storefront","development":false,"defaultAttributes":{"shopId":26967002,"isMerchantRequest":null,"themeId":126792663093,"themeCityHash":"10393074514504265434","contentLanguage":"en","currency":"GBP"},"isServerSideCookieWritingEnabled":true,"monorailRegion":"shop_domain"},"Facebook Pixel":{"pixelIds":["2636722233103947"],"agent":"plshopify1.2"},"Pinterest Pixel":{"pixelId":"2613983618473"},"TikTok Pixel":{"pixelId":"CA3P2K3C77UCBHFR6FCG"},"Google Gtag Pixel":{"conversionId":"G-HFV8P1SZZ7","eventLabels":[{"type":"purchase","action_label":"G-HFV8P1SZZ7"},{"type":"page_view","action_label":"G-HFV8P1SZZ7"},{"type":"view_item","action_label":"G-HFV8P1SZZ7"},{"type":"search","action_label":"G-HFV8P1SZZ7"},{"type":"add_to_cart","action_label":"G-HFV8P1SZZ7"},{"type":"begin_checkout","action_label":"G-HFV8P1SZZ7"},{"type":"add_payment_info","action_label":"G-HFV8P1SZZ7"}],"targetCountry":"GB"},"Session Attribution":{},"S2S":{"facebookCapiEnabled":false,"facebookAppPixelId":"2636722233103947","source":"trekkie-storefront-renderer"}} ); var loaded = false; trekkie.ready(function() { if (loaded) return; loaded = true; window.ShopifyAnalytics.lib = window.trekkie; var originalDocumentWrite = document.write; document.write = customDocumentWrite; try { window.ShopifyAnalytics.merchantGoogleAnalytics.call(this); } catch(error) {}; document.write = originalDocumentWrite; window.ShopifyAnalytics.lib.page(null,{"pageType":"home"}); var match = window.location.pathname.match(/checkouts\/(.+)\/(thank_you|post_purchase)/) var token = match? match[1]: undefined; if (!hasLoggedConversion(token)) { setCookieIfConversion(token); } }); var eventsListenerScript = document.createElement('script'); eventsListenerScript.async = true; eventsListenerScript.src = "//olivias.com/cdn/shopifycloud/shopify/assets/shop_events_listener-a7c63dba65ccddc484f77541dc8ca437e60e1e9e297fe1c3faebf6523a0ede9b.js"; document.getElementsByTagName('head')[0].appendChild(eventsListenerScript); })();