(function() { function bxBootstrap() { var re = /bot|crawl|slurp|spider|mediapartners|headlesschrome|snap-prefetch|remotasks|woorank|uptime\.com|facebookexternalhit|facebookcatalog/i; if (re.test(navigator.userAgent) || navigator.userAgent == '') { return; } if (!(window.bouncex&&bouncex.website)) { var pushedData = []; if(window.bouncex && bouncex.push && bouncex.length){ pushedData = bouncex; } window.bouncex = {}; bouncex.pushedData = pushedData; bouncex.website = {"id":4534,"name":"Salomon","cookie_name":"bounceClientVisit4534","domain":"salomon.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"","force_https":false,"waypoints":false,"content_width":900,"gai":"","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":0,"gmp":0,"whitelist_check":1},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"var CLEAN_URL = bouncex.utils.url.allowParams(),\n\tCAT_MAP = {\n\t\"/sportstyle\": \"view_sports\",\n\t\"/trail-running\": \"view_trail\",\n\t\"/hiking\": \"view_hike\",\n\t\"/road-running\": \"view_road\",\n\t\"/alpine-skiing\": \"view_alpine\",\n\t\"/snowboarding\": \"view_snowboarding\",\n\t\"/cross-country-skiing\": \"view_nordic\"\n};\n/* --------------------------- ITEM TRACKING -------------------------- */\n\nfunction getItemId() {\n var idSelector = jQuery('meta[name=\"at-model-number\"]').attr('content').replace(/\\$/g, '');\n if (jQuery('html').attr('lang') === 'fr' || jQuery('html').attr('lang') === 'fr-ca' && getUrl().indexOf('www.salomon.com/fr-ca') > -1) {\n return idSelector + '-' + 'FR';\n } else if (jQuery('html').attr('lang') === 'en' || jQuery('html').attr('lang') === 'en-ca' && getUrl().indexOf('www.salomon.com/en-ca') > -1) {\n return idSelector;\n }\n}\n\nfunction pullItemIdFromImageUrl(imgUrl) {\n imgUrl = imgUrl || '';\n return imgUrl.split('/article_images/').pop().split('/')[0];\n}\n\nfunction isExcludedProduct() {\n return jQuery('meta[name=\"at-category\"]').attr('content').indexOf('sportstyle:intersection') > -1 || \n jQuery('li[itemprop=itemListElement]').text().trim().indexOf('Sportstyle Intersections') > -1;\n}\n\nfunction getItemCopy(){\n var ic = jQuery('meta[property=\"og:title\"]').attr('content') || jQuery('#product-heading').text() || '';\n \n return ic.replace(' | Salomon', '');\n}\n\nfunction buildItem() {\n return {\n id: getItemId(),\n copy: getItemCopy(),\n category: jQuery('li[itemprop=itemListElement]:last').text().trim() || 'Global',\n imageurl: jQuery('.slider-scroll_slide.-active .layout-pdp-media-zoom:first').attr('data-zoom') || '',\n url: bouncex.utils.url.allowParams('color'),\n instock: jQuery('li.product-sidebar-size.-disabled').length !== jQuery('li.product-sidebar-size').length,\n excluded: isExcludedProduct()\n };\n}\n\nfunction trackItem() {\n var item;\n bouncex.et.onTrue(\n function () {\n item = buildItem();\n return item.id && item.imageurl && item.copy && item.category && item.url;\n },\n function () {\n bouncex.push(['item', item]);\n bouncex.push(['view item', { 'item:id': item.id }]);\n trackAddToCart(item.id);\n }\n );\n}\n\nfunction initializeItemTracking() {\n bouncex.et.onVarChange('color_sku', function () {\n trackItem();\n });\n}\n\n/* --------------------------- CATEGORY TRACKING -------------------------- */\nfunction getItemIds() {\n return jQuery('.product-tile').map(function () {\n var data = jQuery(this).attr('data-swatch-config'),\n idx = data.indexOf('modelNumber'),\n itemId = data.slice(idx, -1).split(',')[0].split(':').pop().replace(/[\"$]/g, '');\n if (itemId) {\n return itemId;\n }\n }).toArray().join(',');\n}\n\nfunction trackCategory() {\n var itemIds = getItemIds();\n if (itemIds && itemIds.length > 0) {\n bouncex.push(['view category',\n {\n 'items:ids': itemIds,\n 'page:url': getUrl()\n }\n ]);\n }\n}\n\nfunction trackCustomCategory(){\n\tfor (i in CAT_MAP){\n\t\tif (CLEAN_URL.indexOf(i) > -1){\n\t\t\tvar eventName = CAT_MAP[i];\n\t\t\tbouncex.push([eventName, {}]);\n\t\t}\n\t}\n}\n\n/* ------------------------------- QUICKVIEW ------------------------------ */\nfunction initializeQuickviewEvents(){\n bouncex.et.onVarChange('quick_view_open', function(newVal){\n var ATCButton = 'button[ref=add-to-cart]',\n itemId = jQuery('.product-sidebar form').attr('data-product-sku').replace('$', '');\n\n if (itemId){\n bouncex.push(['view item', { 'item:id': itemId }]);\n bouncex.off(jQuery(ATCButton), 'click.bx');\n bouncex.on(jQuery(ATCButton), 'click.bx', function() { fireAddToCart(itemId) });\n } \n });\n}\n\n/* --------------------------- CART TRACKING -------------------------- */\n\nfunction trackAddToCart(itemId){\n var ATCButton = 'button[ref=add-to-cart]';\n bouncex.off(jQuery(ATCButton), 'click.bx');\n bouncex.on(jQuery(ATCButton), 'click.bx', function() {\n if (jQuery('.product-sidebar-stock').text().toLowerCase().indexOf(\"in stock\") > -1) {\n fireAddToCart(itemId);\n }\n });\n}\n\nfunction fireAddToCart(itemId) {\n bouncex.push(['add to cart', { 'item:id': itemId }]);\n if (!bouncex.vars.cart) {\n bouncex.setVar('cart', true);\n }\n}\n\nfunction initializeCartTracking() {\n bouncex.et.cart.init({\n replenish: function () { },\n replenishmentType: 'single'\n });\n trackEmptyCart();\n}\n\n/* --------------------------- EMPTY CART TRACKING -------------------------- */\n\nfunction trackEmptyCart() {\n bouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\n if (bouncex.vars.cart && newVal === 0 && oldVal > 0) {\n bouncex.push(['empty cart']);\n bouncex.setVar('cart', false);\n }\n });\n if (bouncex.website.pts === 'cart') {\n if (jQuery('.cart-empty_hang:visible').length > 0) {\n bouncex.push(['empty cart']);\n bouncex.setVar('cart', false);\n }\n }\n}\n\n/* --------------------------- USER TRACKING -------------------------- */\n\nfunction trackLoggedInUser() {\n if (!bouncex.vars.logged_in || !!bouncex.vars.logged_in_identified) {\n return;\n }\n\n var userEmail;\n\n bouncex.et.onTrue(\n function () {\n userEmail = jQuery('.account-block .account-block_body p:contains(\"Email\")').text().split(' ').pop().trim();\n return bouncex.utils.validate.email(userEmail);\n },\n function () {\n bouncex.push([\n 'user',\n {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }\n ]);\n bouncex.setVar('logged_in_identified', true);\n },\n 5\n );\n}\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\nfunction getUrl() {\n return bouncex.utils.url.allowParams('q');\n}\n\nfunction isValidDomain() {\n return getUrl().indexOf('www.salomon.com/en-us') > -1;\n}\n\nfunction isEn() {\n return (jQuery('html').attr('lang') || '').indexOf('en') > -1;\n}\n\nfunction isValidForTracking() {\n return isValidDomain() && isEn();\n}\n\nfunction init() {\n if (isValidForTracking()) {\n initializeCartTracking();\n trackLoggedInUser();\n setTimeout(() => { initializeQuickviewEvents(); }, 1000);\n \n if (bouncex.testmode.bxdev){\n trackCustomCategory();\n }\n switch (bouncex.website.pts) {\n case 'product':\n initializeItemTracking();\n break;\n case 'category':\n case 'search':\n trackCategory();\n break;\n default:\n break;\n }\n }\n}\n\ninit();","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/cart"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('meta[name=\"at-page-type\"][content=\"list-page\"]').length > 0;"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/collection"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('link[rel=\"canonical\"][href=\"https://www.salomon.com/en-us\"]').length > 0;"}]]},"product":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/product"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/catalogsearch"}]]}},"els":{"blank_site_element":"","skip_link":"header[is=\"page-navigation\"]"},"vars":[{"name":"logged_in","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function () {\n if (bouncex.website.pts === 'checkout') {\n return window.isCustomerLoggedIn;\n }\n\n /* if user logs out */\n if (window.location.href.indexOf('/logoutsuccess/') > -1) {\n return false;\n }\n\n\t/* is on account page */\n return jQuery('.account-dashboard .loyalty-reward').length > 0 || null;\n})();","trigger":""},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"(function () {\n if (window.location.href.indexOf(\"checkout\") > -1) {\n return Number(jQuery(\".title span[data-bind]\").text().replace(/[^0-9.]/g, \"\"));\n }\n\n return Number(jQuery(\".qty_content\").text().replace(/[^0-9.]/g, \"\"));\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"(function () {\n if (window.location.href.indexOf(\"checkout\") > -1) {\n return Number(jQuery(\".price\").first().text().replace(/[^0-9.]/g, \"\"));\n }\n\n return Number(jQuery(\".mini-cart_total .price\").first().text().replace(/[^0-9.]/g, \"\"));\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"Number(jQuery(\".price-final_price .price\").first().text().replace(/[^0-9.]/g, \"\"));","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('#product-heading').first().text().trim();","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery(\".js-notify-me:visible\").length === 0;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.newsletter-popin-content_title:contains(\"Thanks for signing up!\"):visible').length > 0 || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"cart_token","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_items","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cookie_modal_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.cookie-popin-content:visible').length > 0;","trigger":"pageload"},{"name":"color_sku","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.url.getParam('color') || ''","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"quick_view_open","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"!!jQuery('#content-panel.-open.-active').length","trigger":"pageload"},{"name":"cart_images","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var $cartImages = jQuery('.summary-product_picture img'),\n images = [],\n img;\n\n $cartImages.each(function(i) {\n img = $cartImages.eq(i).attr('data-srcset');\n\n if (img) {\n images.push(img.split('?')[0]);\n }\n });\n return images.length ? images.join(',') : null;\n})();","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":0,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"et_rid":"espemailid"},"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":0,"spatm":1,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"Send this text to sign-up for automated, recurring Salomon marketing texts, like cart reminders.","eventSharing":false,"shqId":"loybsltgd2-1","enabled":1},"pde":true,"fmc":["US"],"fme":true,"fmx":"","uid2":false,"sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":0},"websdk":{"enabled":0,"devMode":0},"ga4_property_id":"","ga4_measurement_id":"","tag_state_domain":"api.bounceexchange.com","tag_state_domain_enabled":false} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 1 }; bouncex.assets = {"ads":"63c14e746c9ea4217d8f56bbcad6bab3","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"5a21540846ce313490053ca5ed91f6d9","onsite":"c05f8c5551fa6b964660ad61916291c1","sms":"e39203556bab2366e56296ce42e974a7","websdk":"9c2817e65e803cb8c86d0410c88f20c1","website_campaigns_4534":"0ac1c9abd52ec8d7451a3829eb2b81c8"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_c81e76ee00d795b1eebf8d27949f8dc5.br.js'); runtime.setAttribute('async', 'async'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_149e941118422efbd5d227626c13d614.br.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/cjs_min_23e9fb6eac44d2bdee89ffde48eb6611.js'); deviceGraphScript.setAttribute('async', 'async'); var dgAttrs = [{"Key":"id","Value":"c.js"},{"Key":"async","Value":"true"},{"Key":"data-apikey","Value":"2^HIykD"},{"Key":"data-cb","Value":"bouncex.dg.initPostDeviceGraph"},{"Key":"data-bx","Value":"1"},{"Key":"data-gm","Value":"1"},{"Key":"data-fire","Value":"1"}]; if (dgAttrs) { for (var i = 0; i < dgAttrs.length; i++) { deviceGraphScript.setAttribute(dgAttrs[i].Key, dgAttrs[i].Value); } } document.body.appendChild(deviceGraphScript); bouncex.initializeTag = function() {}; }; runtime.onload = bouncex.initializeTag; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();