(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: 60528033958, theme_id: 129021247654, app_name: "storefront", context_url: window.location.href, source_url: "//www.northmall.com/cdn/s/trekkie.storefront.68728afc2577e1593a48001edcb560128ef43fd2.min.js"}); }; scriptFallback.async = true; scriptFallback.src = '//www.northmall.com/cdn/s/trekkie.storefront.68728afc2577e1593a48001edcb560128ef43fd2.min.js'; first.parentNode.insertBefore(scriptFallback, first); }; script.async = true; script.src = '//www.northmall.com/cdn/s/trekkie.storefront.68728afc2577e1593a48001edcb560128ef43fd2.min.js'; first.parentNode.insertBefore(script, first); }; trekkie.load( {"Trekkie":{"appName":"storefront","development":false,"defaultAttributes":{"shopId":60528033958,"isMerchantRequest":null,"themeId":129021247654,"themeCityHash":"9625010832537322662","contentLanguage":"ja","currency":"JPY"},"isServerSideCookieWritingEnabled":true,"monorailRegion":"shop_domain"},"Session Attribution":{},"S2S":{"facebookCapiEnabled":true,"source":"trekkie-storefront-renderer","apiClientId":580111}} ); 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":"page","resourceType":"page","resourceId":99159670950,"shopifyEmitted":true}); 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 = "//www.northmall.com/cdn/shopifycloud/shopify/assets/shop_events_listener-bbbf3223c550be0dd72914a2fa06aaa88eb8943e96f9ea31fb63e7e27e0f97f4.js"; document.getElementsByTagName('head')[0].appendChild(eventsListenerScript); })();