(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":3491,"name":"Shoes For Crews","cookie_name":"bounceClientVisit3491","domain":"shoesforcrews.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"if(bouncex.website.pts === \"cart\"){\n var cartArray = [];\n var $miniCart = jQuery('.checkout-cart:first .checkout-cart__main');\n \n for (var i = 0; i < $miniCart.length; i++) {\n var productObj = {};\n var $product = $miniCart.eq(i);\n productObj.name = $product.find('h3').text().trim();\n productObj.link = $product.find('.description h3 a').attr('href');\n productObj.image = 'https://www.shoesforcrews.com/'+ $product.find('img').attr('src');\n cartArray.push(productObj);\n }\n if(cartArray.length == 0 ){\n bouncex.setVarAndReload('cart_items', false);\n } else {\n bouncex.setVarAndReload('cart_items', JSON.stringify(cartArray));\n }\n}\n","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-356221-1","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":1,"gmp":0,"whitelist_check":0},"burls":[],"ple":false,"fbe":true,"mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* ---------------------------- SHARED VARIABLES ---------------------------- */\n\nvar CLEAN_URL = bouncex.utils.url.allowParams(['q']),\n\tATC_SELECTOR = '.merce-PDP-addcart-button',\n\tEXCLUDED_BRANDS = [\n\t\t'DANSKO',\n\t\t'NEW BALANCE',\n\t\t'DEWALT',\n\t\t'COLE HAAN',\n\t\t'CREWGUARD',\n\t\t'MIGHTYMAT',\n\t\t'PUMA',\n\t\t'CAROLINA',\n\t\t'MIGHTY MAT',\n\t\t'BADGER SPORT',\n\t\t'IRONWEAR',\n\t\t'YAKTRAX',\n\t\t'K1',\n\t\t'POWERSTEP',\n\t\t'CEP'\n\t],\n\tBLOCKED_PARAMS = [\n\t\t'leads',\n\t\t'yc',\n\t\t'cs',\n\t\t'ym',\n\t\t'walrus',\n\t\t'bxdev'\n\t];\n\n/* --------------------------------- HELPERS -------------------------------- */\n\nfunction getIdFromUrl(url) {\n\treturn url.split('/').pop().split('-').shift();\n}\n\nfunction copyContainsExcludedBrand(copy) {\n\tvar isExcluded = false;\n\tcopy = copy || '';\n\n\tEXCLUDED_BRANDS.forEach(function(e){\n\t\tif (copy.toUpperCase().indexOf(e) > -1) {\n\t\t\tisExcluded = true;\n\t\t}\n\t});\n\n\treturn isExcluded;\n}\n\nfunction getPageUrl() {\n\treturn bouncex.utils.url.removeParams(BLOCKED_PARAMS, window.location.href);\n}\n\nfunction getPunchoutSessionValue() {\n\treturn bouncex.utils.getNestedProp('universal_variable.user', [])['punchout_session'];\n}\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\n\nfunction getItem() {\nvar category = bouncex.utils.getNestedProp('__NEXT_DATA__.props.pageProps.product.catlevel1Name') || '',\n\tcopy = jQuery('.merce-PDP-product-full-name').first().text();\n\n return {\n id: getIdFromUrl(CLEAN_URL),\n copy: jQuery('.merce-PDP-product-full-name').first().text(),\n category: category || 'Global',\n url: CLEAN_URL,\n imageurl: jQuery('.carousel-main-img').first().attr('src'),\n instock: jQuery(ATC_SELECTOR).length > 0,\n\t\texcluded: category.toLowerCase() === 'accessories' || copyContainsExcludedBrand(copy)\n };\n}\n\nfunction fireViewItem(id) {\n\tbouncex.push(['view item', { \n\t 'item:id': id,\n\t 'item:itemgroupid': id\n\t}]);\n}\n\nfunction initializeItemEvents() {\n var item;\n\n bouncex.et.onTrue(\n function () {\n item = getItem();\n return !!item.id &&\n !!item.copy &&\n !!item.category &&\n !!item.url &&\n !!item.imageurl &&\n item.imageurl.toLowerCase().indexOf(item.id.toLowerCase()) > -1;\n },\n function () {\n bouncex.push(['item', item]);\n fireViewItem(item.id);\n initializeSkuEvents(item.id);\n initializeATCClickTracking(item.id);\n },\n 10\n );\n}\n\n/* ------------------------------ SKU TRACKING ------------------------------ */\n\nfunction initializeSkuEvents(itemId) {\n bouncex.et.onVarChange('sku_selector', function (oldVal, newVal) {\n\t\tif (newVal) {\n\t\t\tbouncex.push(['select_sku',\n\t\t\t\t{\n\t\t\t\t\t'item:id': itemId,\n\t\t\t\t\t'item:itemgroupid': itemId,\n\t\t\t\t\t'item:feedid': newVal\n\t\t\t\t}\n\t\t\t]);\n\t\t}\n\t});\n}\n\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\n\nfunction getItemIdsCat() {\n var ids = [];\n\n jQuery('[class*=\"ProductThumbnail_thumbnailInner\"] a').each(function (i, e) {\n var id = getIdFromUrl(jQuery(e).attr('href'));\n\n if (id && ids.indexOf(id) < 0) {\n ids.push(id);\n }\n });\n\n return ids.join(',');\n}\n\nfunction getCategoryObject() {\n return {\n 'page:url': CLEAN_URL,\n 'items:ids': getItemIdsCat()\n };\n}\n\nfunction initializeCategoryEvents() {\n var categoryObj;\n\n bouncex.et.onTrue(\n function () {\n categoryObj = getCategoryObject();\n return !!categoryObj['items:ids'].length &&\n !!categoryObj['page:url'];\n },\n function () {\n bouncex.push(['view category', categoryObj]);\n },\n 10\n );\n}\n\n/* ------------------------------- CART EVENTS ------------------------------ */\n\nfunction fireAddToCart(itemId) {\n bouncex.push(['add to cart', { 'item:id': itemId }]);\n\n if (bouncex.vars.cart) {\n return;\n }\n bouncex.setVar('cart', true);\n}\n\nfunction initializeATCClickTracking(itemId) {\n bouncex.et.on(bouncex.document, 'click.bxatc', function () {\n fireAddToCart(itemId);\n }, ATC_SELECTOR);\n}\n\nfunction initializeQuickAdd(){\n bouncex.et.onVisible('.QuickView_quickView__otAUj', function(elem){\n var itemUrl = elem.find('a').attr('href') || '';\n var itemId = getIdFromUrl(itemUrl);\n if (itemId){\n fireViewItem(itemId);\n }\n \n var $qvSizeButtons = jQuery('.QuickView_sizeSelectorItem__P97NC, .QuickView_customSizeSelector__01DOo, .QuickView_addToCart__uAGA0');\n bouncex.off($qvSizeButtons, 'click.bx');\n bouncex.on($qvSizeButtons, 'click.bx', function(){\n fireAddToCart(itemId);\n });\n });\n}\n\nfunction emptyCart() {\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}\n\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n replenish: function () { },\n replenishmentType: 'single'\n });\n\n emptyCart();\n}\n\n/* ------------------------------ USER TRACKING ----------------------------- */\n\nfunction initializeLoggedInUser() {\n\tif (bouncex.vars.logged_in && !bouncex.vars.logged_in_identified) {\n\t\tvar email;\n\t\tbouncex.et.onTrue(function () {\n\t\t\temail = bouncex.utils.getNestedProp('window.bugsnagClient.user.email')\n\t\t\t\t|| bouncex.utils.getNestedProp('window.universal_variable.user.email')\n\t\t\t\t|| bouncex.utils.gtmLookup('emailAddress')\n\t\t\t\t|| '';\n\t\t\treturn email;\n\t\t}, function () {\n\t\t\tif (bouncex.utils.validate.email(email)) {\n\t\t\t\tbouncex.push(['user', {\n\t\t\t\t\temail: email,\n\t\t\t\t\tsource: 'LoggedIn',\n\t\t\t\t\tpunchout: false\n\t\t\t\t}]);\n\t\t\t\tbouncex.setv('logged_in_identified', true);\n\t\t\t}\n\t\t}, 10);\n\t}\n}\n\nfunction trackCorporateUrls() {\n\tif (!bouncex.vars.corporate_logged_in && (getPageUrl().indexOf('partnersites') > -1 || bouncex.utils.url.getParam('CT') === 'P')) {\n\t\tbouncex.push(['corporate_user', {}]);\n\t\tbouncex.setv('corporate_logged_in', true);\n\t}\n}\n\nfunction trackCorporateUser() {\n\tif (bouncex.vars.is_punchout || !getPunchoutSessionValue()) {\n\t\treturn;\n\t}\n\n\tbouncex.push(['is_punchout', {}]);\n\tbouncex.setv('is_punchout', true);\n}\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\n\nfunction isValidDomain() {\n return CLEAN_URL.indexOf('www.shoesforcrews.com') > -1;\n}\n\nfunction isEn() {\n return bouncex.html.attr('lang') === 'en';\n}\n\nfunction isValidForTracking() {\n return isValidDomain() && isEn();\n}\n\nfunction init() {\n if (!isValidForTracking()) {\n return;\n }\n\n initializeCartEvents();\n\tinitializeLoggedInUser();\n\ttrackCorporateUser();\n\ttrackCorporateUrls();\n\n switch (bouncex.website.pts) {\n case 'category':\n case 'search':\n initializeCategoryEvents();\n initializeQuickAdd();\n break;\n case 'product':\n initializeItemEvents();\n break;\n default:\n break;\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"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('#Checkout').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"c_store.mozo"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/ace"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/mozo"}]]},"category":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/catalog"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('section.browse').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"viewDetails"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"c_store.mozo"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/ace"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/mozo"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"searchstring="}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"sfc3/index.cfm"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"Checkout=1"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"c_checkout"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('.checkout__summary').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"c_store.mozo"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/ace"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/mozo"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('link[rel=\"canonical\"][href=\"https://www.shoesforcrews.com/\"]').length > 0;"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === '/';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"c_store.mozo"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/ace"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/mozo"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/product/"}]]},"product":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"viewDetails"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/product/"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"c_store.mozo"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/ace"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/mozo"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"sfc3/index.cfm"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"searchstring="},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search?q="}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"c_store.mozo"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/ace"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/mozo"}]]},"test":{"testmode":true,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":""}]]}},"els":{"CART - Checkout Button":".checkout-cart__btn","CART - Promo Code Apply Button":".price:contains(\"Apply\")","CART - Promo Code Box":".info:has(input[name=\"KeyCode\"])","Checkout_SMS_Capture":"main form[data-testid=\"shipping-form\"] .merce-row:nth-child(9) > div:first-child","Footer":".site-footer","Navigation bar":".site-header","PDP - Color Option":".util-center:has(.buy-box__colors)","PDP - Hero Image":".product-hero__image","PDP - Product Name":".buy-box__title","PDP - Product Price":".buy-box__price-box:has(.buy-box__price) .buy-box__price-group:not(.is-original)","PDP - Quantity Option":".buy-box__quantity-selector","PDP - Review Stars":".bv-secondary-rating-summary.bv-section-summary-block","PDP - Size Option":".field:has(#StyleAndSize)"},"vars":[{"name":"logged_in","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.merce-menu-logout').length > 0 || jQuery('.submenu-list:contains(\"Log Out\")').length > 0;","trigger":""},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in ? true : null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"Number(jQuery('.cart-counter-number').text().trim()) || Number(jQuery('[class*=\"cartCountBadge\"]').first().text()) || Number(jQuery('.cart-counter-number').text());","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function() {\n if (bouncex.website.pts === 'cart' && jQuery('.merce-cart-container').text().indexOf('no items') > -1) {\n return 0;\n }\n\n return bouncex.utils.getNestedProp('window.universal_variable.basket.subtotal', 0) || Number(jQuery('[class*=\"shippingSubTotalLineItem\"] [class*=\"rightCol\"], [class*=\"CartTotalBlock_shippingSubTotalLineItem\"]').first().text().replace(/[^0-9.]/g, '')) || null;\n})();","trigger":""},{"name":"submitted_onsite","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('/subscribe') > -1 || bouncex.utils.getParam('route') === 'c_customer.subscribeAction' || null;","trigger":""},{"name":"prod_name","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"","code":"\njQuery('.merce-PDP-product-full-name').first().text() || jQuery('.buy-box__title:eq(0)').text().trim() || \"\";","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(jQuery('#totalCost').length > 0 ? jQuery('#totalCost').text().replace(/[^0-9.]/g, '') : jQuery('.buy-box__price-group:not(.is-original) .buy-box__price').text().replace(/[^0-9.]/g, '')) || jQuery('[class*=\"pdpPrice\"]').first().text().replace(/[^0-9.]/g, '') || false;","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('#backOrderMessage:visible').length === 0 || jQuery('[class*=backorderText]').text() === '';","trigger":""},{"name":"item_id_product","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_id_quickview","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"","trigger":"event"},{"name":"item_id_hover","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"","trigger":"event"},{"name":"items_ids","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_url","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_image_url","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_category","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_price","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_in_stock","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"page_title","polling":"none","persist":"no","page_types":["category"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_copy","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":"pageload"},{"name":"cart_token","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_items","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"country_type","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('universal_variable.user.language');","trigger":"pageload"},{"name":"customer_type","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('universal_variable.user.customer_type');","trigger":"pageload"},{"name":"punch_out","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('universal_variable.user.punchout_session') || null;","trigger":"pageload"},{"name":"cart_set","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"is_punchout","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"b2b_user","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('universal_variable.user.customer_type') === 'Corp' || null;","trigger":"pageload"},{"name":"promos_allowed_last_login","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"true","code":"(function() {\n var url = window.location.href;\n if (url.indexOf('partnersites') > -1 || url.indexOf('&CT=P') > -1) {\n return false;\n }\n return null;\n})();","trigger":"pageload"},{"name":"show_email_campaign","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n\tvar promosAllowed = '';\n\tvar monetateObjs = jQuery('script:contains(\"monetateQ\"):contains(\"show_email_campaign\")').text().split('{');\n\n for (var i=0; i -1 && monetateObjs[i].indexOf('true') > -1) {\n return true; \n }\n }\n\n\treturn false;\n})();","trigger":"pageload"},{"name":"promo_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"!!jQuery('span:contains(\"⇨ FREE SHIPPING ON ALL SHOES! ⇦\"):visible').attr('style') && jQuery('span:contains(\"⇨ FREE SHIPPING ON ALL SHOES! ⇦\"):visible').attr('style').indexOf('#d9772d') > -1;","trigger":"pageload"},{"name":"sku_selector","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":0,"code":"(function() {\n var selectEvents = window.dataLayer.filter(d => d.event === 'Size Selection'),\n lastSelectEvent = selectEvents.slice(-1)[0],\n sku = lastSelectEvent && lastSelectEvent.product;\n\n if (sku && sku.length > 7 && sku.charAt(7) === '5' && sku.charAt(6) !== '1') {\n sku = sku.slice(0, 7) + '.' + sku.slice(7);\n }\n\n return sku ? sku.replace(/-/g, \"_\") : '';\n})();","trigger":"pageload"},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"corporate_logged_in","polling":"none","persist":"visit","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":1,"spatm":0,"preinit_cjs":"/** \n * Segments - Cartridge Boilerplate\n * This code belongs in pre-init.js. If you want to write code\n * that runs when the page loads but does not leverage the intercept\n * or mirror methods use the Event Tracking code block. Don't forget\n * to change testMode to false to set your code live.\n */\n\nvar segments = {\n /* PROPERTIES */\n testMode: false,\n interceptEnabled: true,\n mirrorEnabled: true,\n dlWatcherEnabled: false,\n /* METHODS */\n /* Intercept Events */\n useIntercept: function() {\n if (this.interceptEnabled) {\n bouncex.utils.shqInterceptEvent = {\n // true blocks event, defined functions run in place of default\n 'productView': function() {\n var prodId = bouncex.utils.getNestedProp('window.UnbxdAnalyticsConf.pid', {});\n\n if (prodId) {\n _shq.push(['pageView', {\n pageType: 'product',\n productId: prodId\n }]);\n }\n },\n 'cartAdd': true, // disabled ATC\n 'cartEmpty': false,\n 'categoryView': true, // disabled Category View\n 'purchase': function() {\n var getEcomObj = window.dataLayer.filter(function(e) {\n return e.event === 'purchase';\n })[0],\n oid = bouncex.utils.getNestedProp('getEcomObj.ecommerce.purchase.actionField.id'),\n ototal = bouncex.utils.getNestedProp('getEcomObj.ecommerce.purchase.actionField.revenue'),\n getProdListObj = bouncex.utils.getNestedProp('getEcomObj.ecommerce.purchase.products'),\n items = [];\n\n if (getEcomObj && getProdListObj && getProdListObj.length > 0) {\n for (var i = 0; i < getProdListObj.length; i++) {\n var itemId = bouncex.utils.getNestedProp('getProdListObj[' + i + '].id', ''),\n itemPrice = bouncex.utils.getNestedProp('getProdListObj[' + i + '].price', ''),\n itemQty = bouncex.utils.getNestedProp('getProdListObj[' + i + '].quantity', '');\n\n items.push({\n productId: itemId,\n price: itemPrice,\n qty: itemQty\n });\n }\n }\n\n if (oid && ototal && items && items.length > 0) {\n _shq.push(['pageView', {\n pageType: 'purchase',\n orderItems: items,\n orderId: oid,\n total: ototal\n }]);\n } else {\n _shq.push(['pageView', {\n pageType: 'purchase',\n orderId: Math.floor(Math.random() * 100000000),\n usebasket: true\n }]);\n }\n\n },\n 'coupon': false,\n 'search': false,\n 'checkout': false,\n 'email': false,\n 'phone': false\n };\n }\n },\n /* Mirror Events */\n useMirror: function() {\n if (this.mirrorEnabled) {\n bouncex.utils.shqMirrorEvent = {\n // defined functions run after designated shq_wknd_event to process event or source names\n 'view category': function() {\n // Category PageView\n var getCatDlObj = window.dataLayer.filter(function(e) {\n return e.event === \"pageview\";\n }),\n catName = getCatDlObj && getCatDlObj[getCatDlObj.length - 1] &&\n getCatDlObj[getCatDlObj.length - 1].pagePath ?\n getCatDlObj[getCatDlObj.length - 1].pagePath.split('/').pop() : '';\n\n\n if (bouncex.website.pts === 'category' && getCatDlObj && catName) {\n _shq.push(['pageView', {\n pageType: 'category',\n catName: catName,\n catId: catName\n }]);\n }\n\n },\n 'pageview': function() {\n // Search Pageview\n var sp = bouncex.utils.getParam('q');\n\n if (bouncex.website.pts === 'search' && sp) {\n _shq.push(['pageView', {\n pageType: 'search',\n searchPhrase: sp\n }]);\n }\n\n // Add To Cart\n var prodId = bouncex.utils.getNestedProp('__NEXT_DATA__.props.pageProps.product.uniqueId', {}),\n prodPrice = bouncex.utils.getNestedProp('__NEXT_DATA__.props.pageProps.product.lowestFinalPrice', {});\n\n if (bouncex.website.pts === 'cart' && prodId && prodPrice) {\n _shq.push(['onCartAdd', {\n CartId: null,\n Items: [{\n ProductId: prodId,\n UnitPrice: prodPrice,\n Quantity: 1\n }],\n Total: null\n }]);\n\n }\n\n },\n 'reloadcampaigns': function() {\n var qtyInCart = jQuery('small.small_1EL6j.margin-left') && jQuery('small.small_1EL6j.margin-left').length > 1 ? +jQuery('small.small_1EL6j.margin-left').text().replace(/[^0-9.]/g, '') : '';\n if (bouncex.website.pts === 'cart' && qtyInCart && qtyInCart === 0) {\n _shq.push(['onCartEmpty']);\n }\n }\n };\n }\n },\n dlFuncs: function(e) {\n // Write handle methods here:\n //PDP\n if (e.PageType && e.PageType === 'ProductPage') {\n //do PDP event\n }\n },\n useDLWatcher: function() {\n if (!!this.dlWatcherEnabled) {\n window.bouncex.et.onTrue(function() {\n return window.bouncex.utils.getNestedProp('window._shq.loaded') && !!window.dataLayer && !!bouncex.et.setInterval;\n }, function() {\n // instantiate DataLayerHandler Object\n var dlWatcher = new _shq.DataLayerHandler(window.dataLayer);\n // invoke watch method\n dlWatcher.watch(function(e) {\n segments.dlFuncs(e);\n }, {});\n });\n }\n },\n /* Initialize Segments Tracking */\n init: function() {\n // test mode\n if (this.testMode && !bouncex.testmode.bxdev) return;\n // attach object to window & bouncex.utils\n if (window.bouncex.utils) bouncex.utils.segments = this;\n\n // initialize intercept and mirror, comment out if not needed\n this.useIntercept();\n this.useMirror();\n }\n}\n\nsegments.init();\n\n//To use dlFuncs call this in Event Tracking\n//bouncex.utils.segments.useDLWatcher();","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 Shoe For Crews mktg txts (like cart reminders) to this #, per terms.","eventSharing":true,"shqId":"cmdjb1w8gp-1","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":"261710645","ga4_measurement_id":"G-ECC2KZ9V46"} ; 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: 0 }; bouncex.assets = {"ads":"0109586821763416266dd874f087ef69","creativesBaseStyles":"a53944a2","inbox":"02aca5df0e176b8810a86da97ac05424","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"0704dae1eb637cbeb4a847506058402d"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_6459738026535cda4232dc813c61447d.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_005dce26d317b1a438255f8f3d35049d.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); } window._shq = window._shq || []; var eventSharingCartridge = document.createElement('script'); eventSharingCartridge.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/wknd_audiences_2648fa8509e4b3a98a2790bb8171ddc1.js'); eventSharingCartridge.setAttribute('async', 'async'); document.body.appendChild(eventSharingCartridge); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();