(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":4663,"name":"Salomon CA","cookie_name":"bounceClientVisit4663","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":"/* --------------------------- ITEM TRACKING -------------------------- */\n\nfunction getItemIdLang(idSelector) {\n if (\n jQuery(\"html\").attr(\"lang\") === \"fr\" ||\n (jQuery(\"html\").attr(\"lang\") === \"fr-ca\" &&\n getUrl().indexOf(\"www.salomon.com/fr-ca\") > -1)\n ) {\n return idSelector + \"-\" + \"FR\";\n } else if (\n jQuery(\"html\").attr(\"lang\") === \"en\" ||\n (jQuery(\"html\").attr(\"lang\") === \"en-ca\" &&\n getUrl().indexOf(\"www.salomon.com/en-ca\") > -1)\n ) {\n return idSelector;\n }\n}\n\nfunction getItemImage() {\n return jQuery('.layout-pdp-media.-active .layout-pdp-media-zoom:first').attr('data-zoom') || jQuery('.swiper-slide-active:first').attr('data-zoom.image') || jQuery('.slider-scroll_slide.-active .layout-pdp-media-zoom:first').attr('data-zoom');\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 var itemImage = getItemImage(),\n idSelector = jQuery('meta[name=\"at-model-number\"]').attr('content').replace(/\\$/g, '');\n \n return {\n id: getItemIdLang(idSelector),\n copy: getItemCopy(),\n category: jQuery('li[itemprop=itemListElement]:last').text().trim() || 'Global',\n imageurl: itemImage || '',\n url: bouncex.utils.url.allowParams('color'),\n instock: jQuery('.product-option.-unavailable').length !== jQuery('.product-option'),\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 a[data-dtm]').map(function(){\n var data = bouncex.parseJSON(jQuery(this).attr('data-dtm')),\n itemId = bouncex.utils.getNestedProp('listing.listingResults.item[0].productInfo.modelNumber', '', data).replace('$', '');\n if (itemId) {\n return getItemIdLang(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\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\n\nfunction initializeCartTracking(){\n bouncex.et.cart.init({ \n replenish: function() { return; },\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 var userEmail = jQuery('.account-block .account-block_body:contains(\"Email\")').text().split('Email:').pop().trim();\n if (bouncex.utils.validate.email(userEmail)) {\n bouncex.push(['user',\n {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }\n ]);\n bouncex.setVar('logged_in_identified', true);\n }\n }\n}\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\nfunction getUrl(){\n return bouncex.utils.url.allowParams();\n}\n\nfunction isValidDomain() {\n return getUrl().indexOf('www.salomon.com/en-ca') > -1 || getUrl().indexOf('www.salomon.com/fr-ca') > -1; \n}\n\nfunction isEn() {\n return jQuery('html').attr('lang') === 'en' || jQuery('html').attr('lang') === 'fr';\n}\n\nfunction isValidForTracking() {\n return isValidDomain() && isEn();\n}\n\nfunction init() {\n if(isValidForTracking()){\n initializeCartTracking();\n trackLoggedInUser();\n switch(bouncex.website.pts){\n case 'product':\n initializeItemTracking();\n break; \n case 'category':\n trackCategory();\n break;\n default:\n break; \n }\n }\n}\n\ninit();\n","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":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/collection"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('meta[name=\"at-page-type\"][content=\"list-page\"]').length > 0;"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"success"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('link[rel=\"canonical\"][href=\"https://www.salomon.com/en-ca\"]').length > 0;"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('link[rel=\"canonical\"][href=\"https://www.salomon.com/fr-ca\"]').length > 0;"}]]},"product":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/product"}]]},"search":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":""}]]}},"els":{"blank_site_element":""},"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(\".notify-me_response-success:visible\").length > 0 ||\nwindow.location.href.indexOf(\"/newsletter/subscribe/confirmation/\") > -1 ||\nnull;","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":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cookie_modal_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery(\".popin_content-wrapper:visible\").length > 0;","trigger":"pageload"},{"name":"language","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n if (window.location.href.indexOf(\"en-ca\") > -1) {\n return \"english\";\n } \n return \"french\";\n})();","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"color_sku","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"bouncex.utils.url.getParam('color') || ''","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":"","eventSharing":false,"shqId":"","enabled":1},"pde":false,"fmc":["CA"],"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"} ; 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":"7b352b1295e35e9c90089d9dd48e488f","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"75060a85c1a4aebcc6f779b9e84db722","onsite":"abbdf7a49be9b52b097917b7b527b262","sms":"e39203556bab2366e56296ce42e974a7","websdk":"0834ab10058954fe44c26b31f2e1ce30"}; 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_ebe451a946893ac92b8458b147333165.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_6ef1802500d8367a80105e664862d0d7.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(); }})();