(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":3270,"name":"Bogs CA","cookie_name":"bounceClientVisit3270","domain":"bogsfootwear.ca","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"if (window.location.pathname === '/shop/customers/accountDetails.html') {\n bouncex.on(jQuery('#account .return a'), 'click.bx', function(){\n bouncex.setv('logged_in', false);\n setBounceCookie();\n });\n}\n","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-2008304-10","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 buttonATCselector = 'a[id=\"main:btnSkuIsAvailable\"]';\n\n/* |----------- HELPER FUNCTIONS ----------------| */\n\nfunction trackItem() {\n\tvar id = getIdFromUrl(window.location.pathname);\n\tbouncex.push([\n\t\t'item',\n\t\t{\n\t\t\tid: id,\n\t\t\tcopy: bouncex.vars.prod_name,\n\t\t\timageurl: getItemImage(),\n\t\t\tcategory: getItemCategory(),\n\t\t\turl: bouncex.utils.url.allowParams(),\n\t\t\tprice: bouncex.vars.prod_price,\n\t\t\tinstock: bouncex.vars.in_stock,\n\t\t\tsecondary_name: jQuery('.detail-view__category').first().text().trim()\n\t\t}\n\t]);\n\n\tbouncex.push(['view item', {\n\t\t'item:id' : id,\n\t\t'item:itemgroupid': id\n\t}]);\n\n\t/*\tsku tracking for catalog modules */\n bouncex.et.setInterval(trackSelectSku(id));\n}\n\nfunction trackSelectSku(itemId) {\n\treturn function() {\n\t\tif (bouncex.vars.prev_sku !== bouncex.vars.sku) {\n\t\t\tif (bouncex.vars.sku) {\n\t\t\t\tbouncex.push([\n\t\t\t\t\t'select_sku',\n\t\t\t\t\t{\n\t\t\t\t\t\t'item:id': itemId,\n\t\t\t\t\t\t'item:itemgroupid': itemId,\n\t\t\t\t\t\t'item:feedid': bouncex.vars.sku\n\t\t\t\t\t}\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\tbouncex.setv('prev_sku', bouncex.vars.sku);\n\t\t}\n\t};\n}\n\nfunction getItemCategory() {\n\tvar subHeader = jQuery('.detail-view__category').first().text().trim().toLowerCase();\n\tif (jQuery('.sale-price').length > 0) { return 'Sale'; }\n\tif (subHeader.indexOf('women') > -1) { return 'Women'; }\n\tif (subHeader.indexOf('men') > -1) { return 'Men'; }\n\tif (subHeader.indexOf('kid') > -1) { return 'Kids'; }\n\tif (subHeader.indexOf('baby') > -1) { return 'Baby'; }\n\telse { return 'Bestseller'; }\n\n}\n\nfunction getItemImage(){\n var img_src = jQuery('#thumbnail-image').attr('value');\n return img_src ? window.location.origin + img_src : jQuery('meta[property=\"og:image\"]').attr('content');\n}\n\nfunction getIdFromUrl(url) {\n\tvar match = url.match(/\\/([\\w-]+)\\.html/);\n\tif (match && match[1]){\n\t\treturn match[1];\n\t}\n}\n\nfunction giftCard() {\n\treturn jQuery('head title').text().indexOf('Gift Card') > -1 ||\n\t\t\twindow.location.href.indexOf('giftCard') > -1\n\t\t\t|| window.location.href.indexOf('netreo') > -1;\n}\n\nfunction workCategory() {\n\tvar param = bouncex.utils.url.getParam('text',window.location.href);\n\treturn param === 'Workman' ||\n param === 'bedrock' ||\n param === 'foundation';\n}\n\nfunction trackCategory() {\n\tbouncex.push(['view category', {\n\t\t'items:ids' : getAllItemIdsOnListpage(),\n\t\t'page:url' : bouncex.utils.url.allowParams('text'),\n\t\t'page:title' : getPageTitle(),\n\t}]);\n}\n\nfunction getPageTitle() {\n\tif (workCategory()) { return 'Work'; }\n\tif (window.location.href.indexOf('sale') > -1) { return 'Sale'; }\n\telse { return jQuery('.page-header--short__subcategory').text().trim() || jQuery('.breadcrumb-text').last().text() || 'Bestsellers'; }\n}\n\nfunction getAllItemIdsOnListpage(){\n\tvar items = jQuery('.product-wrap.product a');\n\tvar itemIds = [];\n\tfor (var i = 0; i < items.length; i++) {\n\t\tvar id = getItemIdOnListpage(items.eq(i));\n\t\tif (id && itemIds.indexOf(id) === -1) {\n\t\t\titemIds.push(id);\n\t\t}\n\t}\n\treturn itemIds.join(',');\n}\n\nfunction getItemIdOnListpage(el){\n\n\treturn getIdFromUrl(el.attr('href'));\n}\n\nfunction trackProductPageATC() {\n\tvar id = getIdFromUrl(window.location.pathname);\n\n\tbouncex.et.onTrue(tokenLoaded, function() {\n bouncex.setv('cart_set', true);\n bouncex.push(['add to cart', {\n 'item:id': id,\n 'cart:token': bouncex.vars.cart_token\n }]);\n\t});\n}\n\nfunction tokenLoaded() {\n\tif (bouncex.vars.cart_token) { return true; }\n\telse { return false; }\n}\n\nfunction fireEmptyCart() {\n\tbouncex.setv('cart_set', false);\n\tbouncex.push(['empty_cart']);\n}\n\n/* |----------- EVENT TRACKING ----------------| */\n\nif (bouncex.vars.valid_domain) {\n\n\tif (bouncex.website.pts === 'product' && !giftCard()) {\n\t\ttrackItem();\n\t}\n\tif ((bouncex.website.pts === 'category' || workCategory()) && !giftCard()) {\n\t\ttrackCategory();\n\t}\n\n\t/* track add to cart from PDP */\n\tif (bouncex.website.pts === 'product' && !giftCard()) {\n\t\tbouncex.et.on(jQuery(document),'click', trackProductPageATC, buttonATCselector);\n\t}\n\n\t/* track empty cart */\n\tif (bouncex.vars.cart_qty === 0 && !!bouncex.vars.cart_set) {\n\t\tfireEmptyCart();\n\t}\n\tbouncex.et.onVarChange('cart_qty', function(oldVal, newVal) {\n\t\tif (!!bouncex.vars.cart_set && oldVal && !newVal) {\n\t\t\tfireEmptyCart();\n\t\t}\n\t});\n}\n\n/* |----------- CART INIT AND REPLENISHMENT ----------------| */\n\nbouncex.et.cart.init({\n\tcartCountVariable: 'cart_qty',\n\tstoreValues: [],\n\treplenishmentType: 'cookie',\n\treplenish: function(cart) {\n\t\tbouncex.utils.cookies.create({\n\t\t\tname: 'customer',\n\t\t\tvalue: cart.token,\n\t\t});\n\t\twindow.location.href = window.location.pathname+'?bx_replen=true';\n\t}\n});\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":"/shoppingCart"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"!!document.getElementById('list_view');"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.products-grids').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/styleGridSearch"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/checkoutLogin"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/checkoutPassword"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"!!document.getElementById('hero_slider');"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('form[action=\"/shop/hero.html\"]').length > 0"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"!!document.querySelector('meta[property=\"og:type\"][content=\"product\"]');"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/styleGridSearch"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/styleGridSearch"}]]}},"els":{"CART - Checkout Button":".row.checkout","CART - Promo Code Apply Button":".promo input:eq(1)","CART - Promo Code Box":".promo input:eq(0)","CAT - Product Grid Image":".swiper-slide-active .list-view__image","Footer":".footer-container","Navigation bar":".navbar","PDP - Add to Cart Button":".product-add","PDP - Color Option":".detail-view__colors","PDP - Hero Image":".detail-view__slides","PDP - Product Name":"div.detail-view__title:visible, h1.detail-view__title:visible","PDP - Product Price":".detail-view__price:visible","PDP - Quantity Option":"","PDP - Review Stars":".pr-snippet-stars-container:visible","PDP - Size Option":".btn[name=\"main:lstSkuSize\"]","PDP - Thumbnail Image":".detail-view__thumbs:visible","SEARCH - Product Grid Image":".swiper-slide-active .list-view__image","wknd_loyalty_sms_placement":".wunderkind-loyalty-sms-"},"vars":[{"name":"logged_in","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (window.location.pathname === \"/shop/customers/accountDetails.html\") {\n return jQuery('#account h1:contains(\"My Account\")').length > 0;\n } else if (bouncex.website.pts === 'checkout') {\n return jQuery('#checkoutPage .row.customer div').length > 1; \n } else {\n return null;\n }\n})();","trigger":""},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(jQuery('#account:contains(\"Sign Out\")').length > 0 || jQuery('#checkoutPage .row.customer div').length > 1) || null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n var total = 0;\n var $items = jQuery('.sidebar__qty span');\n if($items.length > 0){\n for (var i = 0; i < $items.length; i++) {\n total += Number($items.eq(i).text().replace(/[^0-9.]/g, ''));\n }\n } else {\n if(bouncex.website.pts === \"cart\"){\n return Number(jQuery('.checkout[href=\"/shop/shoppingCart.html\"]').text().replace(/[^0-9.]/g, ''))\n }\n if(bouncex.website.pts === \"checkout\"){\n return null;\n }\n total = bouncex.website.pts !== \"cart\" && jQuery('.checkout').length > 0 ? Number(jQuery('.checkout').text().replace(/[^0-9.]/g, '')) : null\n }\n return total;\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n if(bouncex.website.pts === \"checkout\"){\n return null;\n }\n return Number(jQuery('.sidebar__subtotal .sidebar__label span, [id=\"main:cartSubtotal\"], [id=\"checkout:lblAdjustedCartSubtotal\"]').text().split(',')[0].replace(/[^0-9.]/g, ''));\n})()","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.email-suc:contains(\"You have been signed up\"), .email-suc-pop:contains(\"You have been signed up\")').length > 0 || null;","trigger":""},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_plurality","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.cart_qty === 0 ? false : bouncex.vars.cart_qty === 1 ? 'Item' : 'Items';","trigger":"pageload"},{"name":"language","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var navBarLang = \"en\";\n\n jQuery('.navbar__subnav__link').slice(0, 8).each(function() {\n if (jQuery(this).text().toLowerCase().includes(\"bottes\")) {\n navBarLang = \"fr\";\n }\n });\n\n return navBarLang;\n})()","trigger":"pageload"},{"name":"valid_domain","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.location.hostname === \"www.bogsfootwear.ca\" || window.location.hostname === \"bogsfootwear.ca\";","trigger":"pageload"},{"name":"prod_name","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('meta[property=\"og:title\"]').attr('content');","trigger":"pageload"},{"name":"prod_price","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"Number(jQuery('.detail-view__price .sale-price, .detail-view__price:not(:has(.detail-view__price--old))').eq(0).text().replace(/[^0-9.]/g, ''));","trigger":"pageload"},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"!jQuery('[id=\"main:lblNotAvailable\"]').is(':visible');","trigger":"pageload"},{"name":"sku","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#UPC').length && jQuery('#UPC').val() || null;","trigger":"pageload"},{"name":"cart_token","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"getBounceCookie('customer');","trigger":"pageload"},{"name":"cart_set","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"prev_sku","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"null;","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":1,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"bxid":"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":"Hit 'Send' to sign-up for automated, recurring Bogs CA mktg txts (like cart reminders) to this #, per terms.","eventSharing":false,"shqId":"","enabled":1},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"","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},"ga4_property_id":"320128731","ga4_measurement_id":"G-NHCL6RHBVN","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":"005ab6b05ecd8ae76686b26c919990d4","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"75060a85c1a4aebcc6f779b9e84db722","onsite":"abbdf7a49be9b52b097917b7b527b262","sms":"e39203556bab2366e56296ce42e974a7","websdk":"e2d353d057b9c1d931d0252fa287890a"}; 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'); runtime.setAttribute('onload', 'bouncex.initializeTag()'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_315366948044b3a411f1670d0bc21a50.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_3a843477d8e318f67237a66d0a58c542.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() {}; }; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();