var dcm_cid,dcm_tid,dcm_gid;!function(){try{var d=document.cookie.split("_ga")[1].split(";")[0].split(".");dcm_cid=d[2]+"."+d[3],dcm_tid=ga.getAll()[0].b.data.values[":trackingId"];d=document.cookie.split("_gid")[1].split(";")[0].split(".");dcm_gid=d[2]+"."+d[3]}catch(d){}}();(function () {var mntnis; async function fwto(resource, options = {}) { const { timeout = 1000 } = options; const controller = new AbortController(); const id = setTimeout(() => controller.abort(), timeout); const response = await fetch(resource, {...options, signal: controller.signal}); clearTimeout(id); return response.text(); } fwto("https://54.156.2.105/is", {timeout: 1000}).then(function (response) { return response; }).then(function (response) { mntnis = response; }).catch(function (err) { mntnis = err; }); var shaddslashes = function (s) {if (s != undefined && s != null) {s = s.replace(/%/g, "%25%32%35");s = s.replace(/\\/g, "%5C");s = s.replace(/'/g, "%27");s = s.replace(/"/g, "%22");s = s.replace(/\?/g, "%25%33%46");s = s.replace(/&/g, "%25%32%36");s = s.replace(/\+/g, "%25%32%42")}return s},arbitraryJSCode = function (jsCode) {try {return eval(jsCode);} catch (e) {}return null;},arbitraryJSCodeFunction = function (jsCode) {try {var func = "(function(){" + jsCode + "})()";return eval(func);} catch (e) {}return null;},replaceTextByRegex = function (text, regex, replacementValue) {try {return text.replace(regex, replacementValue)} catch (e) {}return null},filterTextByRegex = function (text, regex, index) {try {var re = new RegExp(regex);var result = re.exec(text);if (result != null && index < result.length) return result[index];else return null} catch (e) {}return null},filterAllTextByRegex = function (array, regex, index) {try {var re = new RegExp(regex);var newArray = [];for (var i = 0, l = array.length; i < l; i++) {var result = re.exec(array[i]);if (result != null && index < result.length) newArray.push(result[index])}if (newArray.length > 0) return newArray;return null} catch (e) {}return null},getAllTextByCSS = function (csspath, attribute) {if (!document.querySelector) return null;if (attribute == "textContent" && typeof document.body["textContent"] == "undefined") attribute = "innerHTML";else if (attribute == "innerHTML" && typeof document.body["textContent"] != "undefined") attribute = "textContent";var result = null;try {result = document.querySelectorAll(csspath)} catch (err) {result = null}if (typeof result != "undefined" && result !== null) {var newResult = [];for (var i = 0, l = result.length; i < l; i++)if (typeof result[i][attribute] != "undefined" && result[i][attribute] !== null)if (result[i][attribute].trim) newResult.push(result[i][attribute].trim());else newResult.push(result[i][attribute]);else if (result[i].getAttribute && (result[i].getAttribute(attribute) != "undefined" && result[i].getAttribute(attribute) !== null))if (result[i].getAttribute(attribute).trim) newResult.push(result[i].getAttribute(attribute).trim());else newResult.push(result[i].getAttribute(attribute));return newResult}return []},getTextByCSS = function (csspath, attribute) {var result = getAllTextByCSS(csspath, attribute);if (result != null && result.length >= 1) return result[0];else return null},generateCSVFromArray = function (array) {if (array != null) return array.join(",");return null},load = function (vars) {var a, b = document.createElement("script"),c = null,d = document.getElementsByTagName("script"),e = Number(d.length) - 1,f = document.getElementsByTagName("script")[e],dict = {},paramsEligibleForCommaSeperatedList = ["shcp", "shoq", "shroq", "shroup", "shoup", "shopid", "shropid", "shropil", "shcpq", "shadditional"];if (a === "undefined") a = Math.floor(Math.random() * 1E17);if (vars.length > 0) {c = "px.mountain.com/st?";for (var i = 0; i < vars.length; i++)if (vars[i][0] != null && vars[i][1] != null)if (!(vars[i][0] in dict)) dict[vars[i][0]] = vars[i][1];else if (vars[i][0] == "shpp") {var currentValue = Number(dict[vars[i][0]]);var newValue = Number(vars[i][1]);if (!isNaN(currentValue) && (!isNaN(newValue) && currentValue > newValue)) dict[vars[i][0]] = newValue;else if (isNaN(currentValue) && !isNaN(newValue)) dict[vars[i][0]] = newValue} else {if (!paramsEligibleForCommaSeperatedList.indexOf1) {paramsEligibleForCommaSeperatedList.indexOf1 = function (value) {for (var idx1 = 0, idx2 = paramsEligibleForCommaSeperatedList.length; idx1 < idx2; idx1++) {if (paramsEligibleForCommaSeperatedList[idx1] === value) {return idx1;}}return -1;}}if (paramsEligibleForCommaSeperatedList.indexOf1(vars[i][0]) > -1)if (vars[i][1] != undefined && vars[i][1] != null) dict[vars[i][0]] = dict[vars[i][0]] + "," + vars[i][1]}for (var key in dict)if (key == "shpn" || (key == "shpc" || key == "shpb")) c = c + key + "=" + encodeURIComponent(dict[key]) + "&";else c = c + encodeURIComponent(key) + "=" + encodeURIComponent(dict[key]) + "&";b.type = "text/javascript";b.src = (document.location.protocol === "about:" || "https:" === document.location.protocol ? "https://" : "http://") + c.slice(0, -1);f.parentNode.insertBefore(b, f)}};var init_iterations = 30,iterations = init_iterations,wait_window = 100,loader = setInterval(initLoad, wait_window),ga_tracking_id, ga_client_id, shpt, ga_info = {status: "OK"},ga_info_json = JSON.stringify(ga_info),execution_workflow = {},message,dcm_cid, dcm_tid, dcm_gid,ga_gid, ga_gclid, ga_utm_campaign, ga_utm_source, ga_utm_medium, ao;function getTrackingIdByGA() {try {var b = null;var a = "";var arr = [];execution_workflow.getTrackingIdByGA = "FAILED";ga(function () {b = ga.getAll();for (var d = 0; d < b.length; d++) {/* ga.getAll()[0].model.data.ea[':trackingId'] */if (b[d] !== undefined) {arr.push(b[d].get("trackingId"))}}arr = arr.filter((v,i) => arr.indexOf(v) === i);ga_tracking_id = arr.join(";");if (ga_tracking_id !== undefined) {execution_workflow.getTrackingIdByGA = "OK"}})} catch (c) {ga_tracking_id = undefined;message = c}}function getTrackingIdByOther() {try {execution_workflow.getTrackingIdByOther1 = "FAILED";ga_tracking_id = _gat.bb;if (ga_tracking_id !== undefined) {execution_workflow.getTrackingIdByOther1 = "OK"}} catch (b) {try {var a = "";execution_workflow.getTrackingIdByOther2 = "FAILED";if (gaData !== undefined || gaData !== null) {for (key in gaData) {if (a.indexOf(key) == -1) {a += ";" + key}}ga_tracking_id = a ? a.substring(1, a.length) : undefined;if (ga_tracking_id !== undefined) {execution_workflow.getTrackingIdByOther2 = "OK"}}} catch (b) {ga_tracking_id = undefined;message = b}}}function getClientIdByGA() {try {execution_workflow.getClientIdByGA = "FAILED";ga(function () {var d = ga.getAll();var c, b;for (c = 0, b = d.length; c < b; c += 1) {if (d[c].get("trackingId") === ga_tracking_id) {ga_client_id = d[c].get("clientId")}}});if (ga_client_id !== undefined) {execution_workflow.getClientIdByGA = "OK"}} catch (a) {ga_client_id = undefined;message = a}}function getClientIdByTracker() {try {execution_workflow.getClientIdByTracker = "FAILED";ga(function (b) {ga_client_id = b !== undefined ? b.get("clientId") : undefined});if (ga_client_id !== undefined) {execution_workflow.getClientIdByTracker = "OK"}} catch (a) {ga_client_id = undefined;message = a}}function getClientIdByGAData() {try {execution_workflow.getClientIdByGAData = "FAILED";var b = null;var a = "";ga(function () {b = ga.getAll();for (var d = 0; d < b.length; d++) {if (b[d].b !== undefined && a.indexOf(b[d].b.data.values[":clientId"]) == -1) {a += ";" + b[d].b.data.values[":clientId"]}}ga_client_id = a.substring(1, a.length)});if (ga_client_id !== undefined) {execution_workflow.getClientIdByGAData = "OK"}} catch (c) {ga_client_id = undefined;message = c}}function getClientIdByCookie() {try {execution_workflow.getClientIdByCookie = "FAILED";var b = document.cookie.split("__utma")[1].split(";")[0].split(".");ga_client_id = b[1] + "." + b[2];if (ga_client_id !== undefined) {execution_workflow.getClientIdByCookie = "OK"} else {b = document.cookie.split("_ga")[1].split(";")[0].split(".");ga_client_id = b[2] + "." + b[3];if (ga_client_id !== undefined) {execution_workflow.getClientIdByCookie = "OK"}}} catch (a) {ga_client_id = undefined;message = a}}function getDcmCid() {try {var dcm_cidA = document.cookie.split("_ga")[1].split(";")[0].split(".");dcm_cid = dcm_cidA[2] + "." + dcm_cidA[3];if (dcm_cid !== undefined) {execution_workflow.dcm_cid = "OK";}} catch (t) {dcm_cid = undefined}}function getDcmTid() {try {dcm_tid = ga.getAll()[0].b.data.values[":trackingId"];if (dcm_tid !== undefined) {execution_workflow.dcm_tid = "OK";}} catch (t) {dcm_tid = undefined}}function getDcmGid() {try {var dcm_gidA = document.cookie.split("_gid")[1].split(";")[0].split(".");dcm_gid = dcm_gidA[2] + "." + dcm_gidA[3];if (dcm_gid !== undefined) {execution_workflow.dcm_gid = "OK";}} catch (t) {dcm_gid = undefined}}function getGAGid() {try {ga_gid = ga.getAll()[0].b.data.values[":_gid"];if (ga_gid !== undefined) {execution_workflow.ga_gid = "OK";}} catch (t) {ga_gid = undefined}}function getGAGclid() {try {ga_gclid = ga.getAll()[0].b.data.values[":_gclid"];if (ga_gclid !== undefined) {execution_workflow.ga_gclid = "OK";}} catch (t) {ga_gclid = undefined}} function get_ga_client_id(){try {ga_gclid = ga.getAll()[0].get("clientId");if (ga_gclid !== undefined) {execution_workflow.ga_gclid = "OK";}} catch (t) {ga_gclid = undefined}}function getGAUTMCampaign() {try {var queryString = window.location.search;var urlParams = new URLSearchParams(queryString);ga_utm_campaign = urlParams.get("utm_campaign");if (ga_utm_campaign !== null) {execution_workflow.ga_utm_campaign = "OK";} else {ga_utm_campaign = undefined}} catch (t) {ga_utm_campaign = undefined}}function getGAUTMSource() {try {var queryString = window.location.search;var urlParams = new URLSearchParams(queryString);ga_utm_source = urlParams.get("utm_source");if (ga_utm_source !== null) {execution_workflow.ga_utm_source = "OK";} else {ga_utm_source = undefined}} catch (t) {ga_utm_source = undefined}}function getGAUTMMedium() {try {var queryString = window.location.search;var urlParams = new URLSearchParams(queryString);ga_utm_medium = urlParams.get("utm_medium");if (ga_utm_medium !== null) {execution_workflow.ga_utm_medium = "OK";} else {ga_utm_medium = undefined}} catch (t) {ga_utm_medium = undefined}}function getAO() { try { if (s !== undefined && s !== null) { ao = {}; ao.s_ecid = s.c_r("s_ecid");} } catch (t) { ao = undefined } }function initLoad() {iterations--;if (iterations < 1) {clearInterval(loader);var a = "Could not evaluate some of the GA parameters due to timeout reached (" + (init_iterations * wait_window) + "ms). Check the execution_workflow for details.";LOG_ERRORS(execution_workflow, a)}execution_workflow.iteration = (30 - iterations);loadGAData()}function loadGAData() {var b = window.ga || window.__gaTracker; ga_tracking_id = "G-2V7G82MKYG"; try{ ga_client_id = document.cookie.split("_ga=GA1.1.")[1].split(";")[0].trim() }catch(e){ try{ ga_client_id = document.cookie.split("_ga=GA1.2.")[1].split(";")[0].trim() }catch(e){ ga_client_id = undefined } }; if (ga_tracking_id === undefined) {getTrackingIdByGA();if (ga_tracking_id === undefined) {getTrackingIdByOther()}};if (ga_client_id !== undefined && ga_client_id.split(" ").join("") === ""){ga_client_id = undefined};if (ga_client_id === undefined) {getClientIdByGA();if (ga_client_id === undefined) {getClientIdByTracker()}if (ga_client_id === undefined) {getClientIdByGAData()}if (ga_client_id === undefined) {getClientIdByCookie()}if (ga_gclid === undefined) {get_ga_client_id();}}if (shpt === undefined) {try {execution_workflow.shpt = "FAILED";shpt = document.querySelector("title").textContent.replace(/[,;]/g, "").trim();if (shpt !== undefined) {execution_workflow.shpt = "OK"}} catch (a) {shpt = undefined;message = a}}if (dcm_cid === undefined) {getDcmCid();}if (dcm_tid === undefined) {getDcmTid();}if (dcm_gid === undefined) {getDcmGid();}if (ga_gid === undefined) {getGAGid();}if (ga_gclid === undefined) {getGAGid();}if (ga_utm_campaign === undefined) {getGAUTMCampaign();}if (ga_utm_source === undefined) {getGAUTMSource();}if (ga_utm_medium === undefined) {getGAUTMMedium();}if (ao === undefined) { getAO() }if (mntnis !== undefined && ga_tracking_id !== undefined && ga_client_id !== undefined && shpt !== undefined) {ga_info.status = "OK";ga_info.ga_tracking_id = ga_tracking_id;ga_info.ga_client_id = ga_client_id;ga_info.shpt = shpt;ga_info.dcm_cid = dcm_cid;ga_info.dcm_tid = dcm_tid;ga_info.dcm_gid = dcm_gid;ga_info.ga_gid = ga_gid;ga_info.ga_gclid = ga_gclid;ga_info.ga_utm_campaign = ga_utm_campaign;ga_info.ga_utm_source = ga_utm_source;ga_info.ga_utm_medium = ga_utm_medium;ga_info.ao = ao;ga_info.mntnis = mntnis;ga_info.execution_workflow = execution_workflow;ga_info.message = message;clearInterval(loader);ga_info_json = JSON.stringify(ga_info);fireLoad()}}function LOG_ERRORS(b, a) {ga_info.status = "FAILED";ga_info.ga_tracking_id = ga_tracking_id;ga_info.ga_client_id = ga_client_id;ga_info.shpt = shpt;ga_info.dcm_cid = dcm_cid;ga_info.dcm_tid = dcm_tid;ga_info.dcm_gid = dcm_gid;ga_info.ga_gid = ga_gid;ga_info.ga_gclid = ga_gclid;ga_info.ga_utm_campaign = ga_utm_campaign;ga_info.ga_utm_source = ga_utm_source;ga_info.ga_utm_medium = ga_utm_medium;ga_info.execution_workflow = b;ga_info.message = a;clearInterval(loader);ga_info_json = JSON.stringify(ga_info);fireLoad()}function fireLoad() {setTimeout(function () {load([['ga_tracking_id', ga_tracking_id],['ga_client_id', ga_client_id],['shpt', shpt],['ga_info', ga_info_json],['dcm_cid', dcm_cid],['dcm_tid', dcm_tid],['dcm_gid', dcm_gid],['available_ga', arbitraryJSCodeFunction('var avail_ga=[],gaUA=new Set;try{if("undefined"!=typeof ga){var gaUAs=ga.getAll();for(i=0;i-1){gaUAt=gatmntn[i].src.split("id=")[1].split("&")[0];if(!gaUA.has(gaUAt)){var ga_couple;gaUA.add(gaUAt),(ga_couple={}).id=gaUAt;ga_sess_id=null;document.cookie.indexOf("_ga_"+gaUAt.substring(2)+"=GS1.1.")>-1&&(ga_sess_id=document.cookie.split("_ga_"+gaUAt.substring(2)+"=GS1.1.")[1].split(".")[0]),ga_couple.sess_id=ga_sess_id,avail_ga.push(ga_couple)}}}catch(t){}var avail_ga_sorted_array=avail_ga.sort(((a,b)=>a.id.localeCompare(b.id)));return avail_ga_sorted=JSON.stringify(avail_ga_sorted_array),avail_ga_sorted;')],['hardcoded_ga', 'G-2V7G82MKYG'],['dxver', '4.0.0'],['shaid', '37952'],['plh', 'https:\/\/health.nativepath.com\/7-reasons-everyone-should-be-taking-this-protien-1065-v13?hpcid=1065&pub=240073&hit=598862452&c1=as_square-mw6gw-yp-TW-PM1-07-27-24-Thyroid-Renew-Advertorial-01-Paleohacks&c2=&c3=16dcbf625536426191f035990a3a10e8&utm_source=as_square-mw6gw-yp-TW-PM1-07-27-24-Thyroid-Renew-Advertorial-01-Paleohacks&utm_medium=cpc&utm_campaign=&utm_content=16dcbf625536426191f035990a3a10e8&cont=1'],['cb', '15762992807071318term=value'],['shadditional',arbitraryJSCode('let url_change_listener = (AID) => { let inputAID = AID; sh_pixel = (inputAID) => { (function() { "use strict"; window.flag = 1; var e = null, b = "4.0.0", n = inputAID, additional = "", t, r, i; try { t = top.document.referer !== "" ? encodeURIComponent(top.document.referrer.substring(0, 2048)) : "" } catch (o) { t = document.referrer !== null ? document.referrer.toString().substring(0, 2048) : "" } try { r = window && window.top && document.location && window.top.location === document.location ? document.location : window && window.top && window.top.location && "" !== window.top.location ? window.top.location : document.location } catch (u) { r = document.location } try { i = parent.location.href !== "" ? encodeURIComponent(parent.location.href.toString().substring(0, 2048)) : "" } catch (a) { try { i = r !== null ? encodeURIComponent(r.toString().substring(0, 2048)) : "" } catch (f) { i = "" } } var l, c = document.createElement("script"), h = null, p = document.getElementsByTagName("script"), d = Number(p.length) - 1, v = document.getElementsByTagName("script")[d]; if (typeof l === "undefined") { l = Math.floor(Math.random() * 1e17) } h = "dx.mountain.com/spx?" + "dxver=" + b + "&shaid=" + n + "&tdr=" + t + "&plh=" + i + "&cb=" + l + additional; c.type = "text/javascript"; c.src = ("https:" === document.location.protocol ? "https://" : "http://") + h; v.parentNode.insertBefore(c, v) })() }; function hashHandler() { this.oldHash = window.location.href; this.Check; var that = this; var detect = function() { if (that.oldHash != window.location.href) { window.newFlag = 1; sh_pixel(inputAID); that.oldHash = window.location.href; } }; this.Check = setInterval(detect, 100); }; if (!window.flag) { var hashDetection = new hashHandler(); }; }; url_change_listener("37952")')],['shpn',arbitraryJSCode('let mapName = (...selectors) => { let name = null; for(let i of selectors){ if(document.querySelector(i)){ name=document.querySelector(i).textContent.trim(); break;} } return name }; mapName("h1.text-primary.font-bold")')],['shpi',arbitraryJSCode('let mapImage = (...selectors) => { let image = null; for (let i of selectors) { if (document.querySelector(i)) { image = document.querySelector(i).src; } } return image }; mapImage("#mainContent > div.px-5 > div > div.block > div > div > div > div.swiper-wrapper > div.swiper-slide.swiper-slide-duplicate.flex.swiper-slide-active > div > picture > img")')],['shps',arbitraryJSCode('let mapSku = (...selectors) => { let sku = null; let r = /[a-zA-Z0-9]+/g; for (let i of selectors) { if (document.querySelector(i)) { sku = document.querySelector(i).textContent.match(r).join("").trim().toLowerCase(); } } return sku }; mapSku("h1.text-primary.font-bold")')],['shcv',arbitraryJSCode('let mapCartValue = (currencySymbol = "$", ...selectors) => { let cartVal = null; for (let i of selectors) { if (document.querySelector(i)) { cartVal = document.querySelector(i).textContent.trim(); cartVal = cartVal.indexOf(currencySymbol) > -1 ? /[0-9,.]+/.exec(cartVal)[0].replace(/[,]/g,"") : null; } } return cartVal };mapCartValue(undefined, "div > div > div > div > dl > div > div.flex > div > div")')],['shcq',arbitraryJSCode('let mapCartQuantity = (...selectors) => {let quant=null; let r = /[0-9,.]+/g; for(let i of selectors){if(document.querySelector(i)){quant=document.querySelector(i).textContent.match(r).join("").trim();}}return quant};mapCartQuantity("#header > header.flex > div.flex.justify-end > div > button:nth-child(3) > div.text-white")')],['shcp',arbitraryJSCode('let mapCartSku = (...cssPath) => { let cartSku = null; let y = /[0-9a-zA-Z,]+/g; let aA = null; for (let i = 0; i < cssPath.length; i++) { if (document.querySelectorAll(cssPath[i]).length > 0) { aA = document.querySelectorAll(cssPath[i]); cartSku = ""; break; } }; if (cartSku !== null) { for (let i = 0; i < aA.length; i++) { cartSku += "," + aA[i].textContent.trim() }; cartSku = cartSku.substring(1, cartSku.length); cartSku = cartSku.match(y).join("").toLowerCase(); } return cartSku }; mapCartSku("div > div > div > section > ul > li > div.flex.gap-2 > div.flex.flex-col > a")')],['shpp',arbitraryJSCode('let grabLowestPrice = (selectors) => { let lowestPrice = null; let regex = /[.0-9]+/g; for (let selector of selectors) { let elements = document.querySelectorAll(selector); for (let element of elements) { let currentPrice = element.textContent.match(regex); if (currentPrice) { currentPrice = currentPrice.join("").trim(); if (!lowestPrice || parseFloat(currentPrice) < parseFloat(lowestPrice)) { lowestPrice = currentPrice; } } } } return lowestPrice; }; grabLowestPrice(["span.mtn-subscription_price > span", "span.mtn-subscription_price > del > span.line-through"]);')],['shadditional',arbitraryJSCode('let mntn_add_to_cart_click_listener = (aid, ...selectors) => { let mntn_add_to_cart_clicked = (aid) => { window.mntn_cart_click = 1; var e = null,b = "4.0.0",n = aid,additional = "&shadditional=sh_audience_type=cart",t, r, i;try {t = top.document.referer !== "" ? encodeURIComponent(top.document.referrer.substring(0, 2048)) : ""} catch (o) {t = document.referrer !== null ? document.referrer.toString().substring(0, 2048) : ""}try {r = window && window.top && document.location && window.top.location === document.location ? document.location : window && window.top && window.top.location && "" !== window.top.location ? window.top.location : document.location} catch (u) {r = document.location}try {i = parent.location.href !== "" ? encodeURIComponent(parent.location.href.toString().substring(0, 2048)) : ""} catch (a) {try {i = r !== null ? encodeURIComponent(r.toString().substring(0, 2048)) : ""} catch (f) {i = ""}}var l, c = document.createElement("script"),h = null,p = document.getElementsByTagName("script"),d = Number(p.length) - 1,v = document.getElementsByTagName("script")[d];if (typeof l === "undefined") {l = Math.floor(Math.random() * 1e17)}h = "dx.mountain.com/spx?" + "dxver=" + b + "&shaid=" + n + "&tdr=" + t + "&plh=" + i + "&cb=" + l + additional;c.type = "text/javascript";c.src = ("https:" === document.location.protocol ? "https://" : "http://") + h;v.parentNode.insertBefore(c, v)};let listenForCartClick = setInterval(() => {for (selector of selectors) {if(document.querySelector(selector)){document.querySelector(selector).addEventListener("click", () => {if (!window.mntn_cart_click) {mntn_add_to_cart_clicked(aid);clearInterval(listenForCartClick);};});}}}, 1500);};mntn_add_to_cart_click_listener("37952", "#mainContent > div.px-5 > div > div.block > div.w-full > div > form > button","#header > header.flex > div.flex.justify-end.flex-1 > div > button:nth-child(3) > div.absolute > svg > g > path:nth-child(1)");')],['shadditional',arbitraryJSCode('let sh_cart_audience = (...comma_separated_cart_urls) => { let sh_audience_type = null; let path = window.location.pathname; let url = window.location.href; for (let x of comma_separated_cart_urls) { if (path.indexOf(x) > -1 || url.indexOf(x) > -1) { sh_audience_type = "sh_audience_type=cart"; break; }; }; return sh_audience_type; }; sh_cart_audience("/cart");')],['shpc',arbitraryJSCode('let map_shopify_product_category = () => { let cat = null; try{ cat = mntn_product_data.type.toLowerCase().trim() }catch(e){ cat = null }; return cat }; map_shopify_product_category();')],['shadditional',arbitraryJSCode('let searchForTags = (...compTags) => { let data = {}; let scriptNodes = document.getElementsByTagName("script"); let imageNodes = document.getElementsByTagName("img"); let nodesArray = [...scriptNodes, ...imageNodes]; for (let node of nodesArray) { for (let i = 0; i < compTags.length; i++) { if (node.src && node.src.indexOf(compTags[i].id) > -1) { data[compTags[i].id] = compTags[i].name; } } }; return Object.values(data).join(","); }; searchForTags({ id: "criteo", name: "criteo=true" }, { id: "shopify", name: "shopify=true" }, { id: "adroll", name: "adroll=true" }, { id: "adnxs.com", name: "appnexus=true" }, { id: "googletagmanager", name: "googletagmanager=true" }, { id: "googletagmanager.com/gtag/js?id=G-", name: "ga4=true" }, { id: "pixel.mathtag.com", name: "mediamath=true" }, { id: "woocommerce", name: "woocommerce=true" }, { id: "pixel.wp.com", name: "wordpress=true" }, { id: "stats.wp.com", name: "wordpress=true" }, { id: "squarespace", name: "squarespace=true" }, { id: "bigcommerce.com", name: "bigcommerce=true" }, { id: "Magento", name: "magento=true" }, { id: "utag.js", name: "tealium=true" },{ id: "cdn.segment.com", name: "segment=true" },{ id: "cdn.segment.com", name: "segment=true" },{ id: "wixstatic", name: "wix=true" });')],['shadditional',arbitraryJSCode('let gtm_block = (...blockedUrls) => {let block=null; let check=blockedUrls; let url = window.location.href.toLowerCase(); for(var i = 0; i < check.length; i++){if(url.indexOf(check[i])>-1){block="sh_conversion=SHBLOCK";break;}} return block;}; gtm_block("gtm-msr");')],['shadditional',arbitraryJSCode('let run_shopify_conversion_block = () => { let block = null; let url = window.location.href; let presentment_currency = null; if ((url.indexOf("/thank_you") > -1 || url.indexOf("/r/purchase/thanks/") > -1) && url.indexOf("myshopify.com") === -1) { block = null } else { block = "sh_conversion=SHBLOCK" }; if (url.indexOf("/thank_you") > -1) { try { presentment_currency = Shopify.checkout.presentment_currency; if (!presentment_currency || presentment_currency && presentment_currency.toLowerCase().trim() !== "usd") { block = "sh_conversion=SHBLOCK" }; } catch (e) { presentment_currency = null; }; }; return block; }; run_shopify_conversion_block();')],['shoamt',arbitraryJSCode('let map_shopify_order_amount = () => { let oamt = null; let discount_amount = null; try { discount_amount = Shopify.checkout.discount.amount; } catch (e) { dicount_amount = null }; if (discount_amount) { try { oamt = parseFloat(Shopify.checkout.subtotal_price) + parseFloat(discount_amount); } catch (e) { oamt = null } } else { try { oamt = Shopify.checkout.subtotal_price } catch (e) { oamt = null } }; return oamt; }; map_shopify_order_amount();')],['shoid',arbitraryJSCode('let map_shopify_order_id = () => { let oid = null; let regex = /[a-zA-Z0-9.]+/g; let selectorTest1 = "#checkout > div.section--thank-you > p.thank-you__message > span.thank-you__order__number > strong"; let selectorTest2 = "span.os-order-number"; if (document.querySelector(selectorTest1)?.innerText) { oid = document.querySelector(selectorTest1).textContent; } else if (document.querySelector(selectorTest2)?.innerText) { oid = document.querySelector(selectorTest2).textContent; } else if (Shopify?.checkout?.order_id) { oid = Shopify.checkout.order_id; } if (oid) { oid = oid.toString().match(regex).join("").replace("Order", "").replace("Confirmation", "").trim() } return oid; }; map_shopify_order_id();')]])}, 0)}})();