(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":3634,"name":"Shinesty","cookie_name":"bounceClientVisit3634","domain":"shinesty.com","ct":"multi_cookie","ally":0,"ei":1,"tcjs":"","cjs":"/* https://www.wrike.com/open.htm?id=876092036 */\n\nbouncex.setCouponCookie = function(cookie, domain) {\n domain = domain || location.host;\n var domains = [\n domain, /* with subdomain */\n domain.replace('www', ''), /* no subdomain i.e. .forever21.com */\n ];\n\n for (var k = 0; k < domains.length; k++) {\n /* delete any existing cookie */\n bouncex.utils.cookies.create({\n name: \"discount_code\",\n value: cookie,\n days: -1,\n domain: domains[k]\n });\n /* write cookie value saved from previous session */\n bouncex.utils.cookies.create({\n name: \"discount_code\",\n value: cookie,\n domain: domains[k]\n });\n }\n}\n\nbouncex.infoStore = {\n sessionStorageIdentifier: 'bxInfoStore',\n set: function(data) {\n var hashedData = bouncex.lz.compressToURI(JSON.stringify(data));\n try {\n sessionStorage.setItem(this.sessionStorageIdentifier, hashedData);\n } catch(e) {\n bouncex.err('session storage failure');\n }\n },\n \n get: function() {\n var info = sessionStorage.getItem(this.sessionStorageIdentifier);\n return info ? JSON.parse(bouncex.lz.decompressFromURI(info)) : '';\n },\n \n infoIsStored: function() {\n return !!sessionStorage.getItem(this.sessionStorageIdentifier);\n },\n \n populateFields: function(fields) {\n if (!this.infoIsStored()) return;\n \n var data = this.get();\n for (var field in fields) {\n if (fields.hasOwnProperty(field)) {\n fields[field].val(data[field]);\n }\n }\n }\n};\n\n/* https://www.wrike.com/open.htm?id=887224652 */\n(function() {\n if (bouncex.website.pts === 'checkout') {\n var coupon = bouncex.cookie.cpn,\n cartValueOver30 = bouncex.vars.cart_value > 30,\n subscriptionCheckout = bouncex.utils.url.allowParams().indexOf('subscription') > -1,\n couponCodeAlreadyVisible = jQuery('span.reduction-code__text:visible').length > 0 || jQuery('span[data-discount-code]:visible').length > 0,\n $couponField;\n\n if (couponCodeAlreadyVisible || !(coupon)) {\n return;\n }\n\n if (subscriptionCheckout) {\n $couponField = jQuery('#discount_code');\n } else {\n $couponField = jQuery('#checkout_reduction_code');\n }\n\n if (cartValueOver30 && coupon['10off30']) {\n $couponField.val(coupon['10off30']);\n if (subscriptionCheckout) {\n jQuery('#apply-discount').click();\n } else {\n jQuery('form.edit_checkout').last().submit();\n }\n } else if (subscriptionCheckout && ['thong', 'cheeky'].indexOf(bouncex.vars.subscriptions_in_cart) > - 1) {\n var cheekyOrThong = Object.keys(coupon)[0];\n if (cheekyOrThong.indexOf('thong') > -1 || cheekyOrThong.indexOf('cheeky') > -1) {\n $couponField.val(Object.values(coupon)[0]);\n jQuery('#apply-discount').click();\n }\n }\n }\n})();\n\n\n// (function() {\n// if (bouncex.testmode.bxdev && bouncex.utils.url.allowParams().indexOf('monthly-boxer-subscription') > -1) {\n// bouncex.et.onVisible('main.visible', function () {\n// bouncex.log('working');\n// bouncex.website.pts = 'product';\n// });\n// }\n// })();","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-41002306-19","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":"var excludedUrl = [\n 'gift-card',\n 'pack-builder',\n 'build-a-boxer-pack',\n 'fathers-day-build-a-ball-hammock'\n ],\n EXCLUSIONS = [6895582642245, 6895582773317, 6895582380101, 6895581429829, 6895582937157, 6895582249029, 6895581102149, 4676102225989, \n 6758433620037, 6758453674053, 6758449512517, 6758453084229, 6897186897989, 6897188044869];\n\n/* --------------------------------- HELPERS -------------------------------- */\n\nfunction getUrl() {\n return bouncex.utils.url.allowParams();\n}\n\nfunction setVarAndCookie(varName, value) {\n bouncex.setVar(varName, value);\n bouncex.setBounceCookie();\n\n return;\n}\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\nfunction getCurrentImageSrc(itemDataImage) {\n var pageUrl = window.location.href;\n\n if (pageUrl.indexOf('monthly-thong-subscription') > -1 || pageUrl.indexOf('couples-underwear-subscription') > -1) {\n return jQuery('img[alt=\"header image\"]').first().prop('currentSrc');\n } else if (pageUrl.indexOf('monthly-boxer-subscription') > -1) {\n return jQuery('img[alt=\"boxers\"]').first().prop('currentSrc');\n }\n return itemDataImage || jQuery('[property=\"og:image\"]').first().attr('content');\n}\n\n\nfunction getItem() {\n \n // var gtmID = bouncex.utils.url.getParam('id', jQuery('script[src*=\"googletagmanager\"]').attr('src'))\n \n // var defaultData = { category: '', product_id: '', name: '', image: '', inventory: \"\" },\n // itemDetail = gtmID && window.google_tag_manager[gtmID] ? bouncex.utils.gtmLookup('ecommerce') : false,\n // itemData = bouncex.utils.getNestedProp(\n // 'detail.products.0',\n // defaultData,\n // itemDetail\n // ),\n // url = getUrl(),\n // isSubscription = false,\n // inStock = +itemData.inventory > 0;\n\n // if (url.indexOf('subscription') > -1 || itemData.category === 'Subscriptions'){\n // itemData.category = 'Subscriptions';\n // isSubscription = true;\n // inStock = true;\n // }\n \n if(wunderkindData && wunderkindData.productId != false){\n return {\n id: wunderkindData.productId,\n copy: wunderkindData.productTitle,\n category: jQuery('[itemprop=\"category\"]').attr('content'),\n imageurl: wunderkindData.productImage,\n url: getUrl(),\n instock: wunderkindData.productIsInstock,\n excluded: wunderkindData.productIsExcluded,\n subscription: wunderkindData.isSubscriptionPage\n }\n }\n \n\n // return {\n // id: itemData.product_id || jQuery('[itemprop=\"productID\"]').attr('content') || bouncex.utils.url.allowParams().split('/products/')[1],\n // copy: itemData.name.split(' | ')[0] || jQuery('[itemprop=\"og:title\"], [property=\"og:title\"]').attr('content').split('|')[0].trim(),\n // category: itemData.category || jQuery('[itemprop=\"category\"]').attr('content'),\n // url: url,\n // // imageurl: itemData.image || jQuery('[property=\"og:image\"]').first().attr('content'),\n // imageurl: getCurrentImageSrc(itemData.image),\n // instock: inStock || jQuery('[itemprop=\"availability\"]').attr('content') === \"InStock\",\n // excluded: false,\n // subscription: isSubscription\n // };\n}\n\nfunction isExcludedFromTracking(url){\n var match = excludedUrl.filter(function(excludedItem) {\n return url.indexOf(excludedItem) > -1;\n });\n\n return match.length === 0;\n}\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 },\n function() {\n if (!isExcludedFromTracking(item.url)) {\n return;\n }\n\n if(!!item.imageurl){\n bouncex.push(['item', item]);\n }\n bouncex.log('coming from item events tracking');\n\t\t\tfireViewItem(item.id);\n\n\t\t\tif (item.url.indexOf('subscription') > -1 || item.subscription){\n\t\t\t initializeSubscriptionTracking(item.id);\n\t\t\t return;\n\t\t\t}\n\n notfiyMeEvents(item.id);\n\n fireVarSkuTracking(item.id);\n initializeViewEvents();\n initializeVarATCTracking();\n \n // bouncex.et.on(jQuery(document), 'click', trackPDPATC, 'main #add_to_cart:visible');\n },\n 10\n );\n\n return;\n}\n\nfunction fireViewItem(itemId){\n bouncex.push(['view item', {\n 'item:id': itemId,\n 'item:itemgroupid': itemId\n\t}]);\n}\n\n/* ------------------------------ SUBSCRIPTION TRACKING ------------------------------ */\n\n// On individual subscription pages we want to fire a subscription event and load an ATC handler.\nfunction initializeSubscriptionTracking(itemId){\n detectSubscriptionTypeAndPushEvent(itemId, true);\n initializeVarATCTracking();\n}\n\n// On the \"All Subscriptions\" page, we are firing view item for each subscription.\n// If a user clicks into a specific subscription, we are firing the subscription event.\n// ATC with the subscription ID will fire after a user completes the flow and adds to cart.\nfunction clickToViewSubscription(){\n allSubViewEvent();\n initializeVarATCTracking();\n\n bouncex.et.on(jQuery(document), 'click.bx', function(e){\n var selectText = jQuery(e.target).text(),\n subscriptionId = detectSubscriptionTypeAndPushEvent(selectText, true);\n bouncex.setVar('sub_id', subscriptionId);\n\n }, 'button[title=\"begin selection wizard\"]');\n}\n\n\nfunction allSubViewEvent(){\n jQuery('.gap-4 button[title=\"begin selection wizard\"]').each(function(){\n var subType = jQuery(this).text(),\n subId = detectSubscriptionTypeAndPushEvent(subType);\n\n fireViewItem(subId);\n });\n}\n\n// We will push the subscription event if pushEvent = true and return the subscription ID in all cases.\nfunction detectSubscriptionTypeAndPushEvent(id, pushEvent){\n \n if(id.indexOf('thong') > -1){\n bouncex.push(['thong_subscription']);\n } else if(id.indexOf('boxer') > -1){\n bouncex.push(['boxer_subscription']);\n } else if(id.indexOf('couples-underwear') > -1){\n bouncex.push(['matching_subscription']);\n } \n \n switch (id) {\n case '1653430157381':\n\t\tcase '6785612873797':\n case 'Select men\\'s':\n if (pushEvent){\n bouncex.push(['boxer_subscription']);\n }\n \t return 6785612873797;\n case '1881099141189':\n\t\tcase '6785612841029':\n case 'Select women\\'s':\n if (pushEvent){\n bouncex.push(['thong_subscription']);\n }\n return 6785612841029;\n \tcase '2079872581701':\n \tcase '6785613103173':\n \tcase 'Select couples':\n \t if (pushEvent){\n bouncex.push(['matching_subscription']);\n \t }\n return 6785613103173;\n default:\n break;\n }\n}\n\n\n/* ------------------------------ CATALOG TRACKING ------------------------------ */\n\nfunction fireVarSkuTracking(){\n \n var feedGroup = jQuery('[itemprop=\"productID\"]').attr('content');\n var itemID = getItem().id\n if(itemID && feedGroup){\n bouncex.push(['select_sku', {\n 'item:id': itemID,\n 'item:itemgroupid': feedGroup,\n 'item:feedid': wunderkindData.selectedVariantId\n }]);\n }\n}\n\n\n// Identify users who sign up for waistlist on out of stock products.\nfunction notfiyMeEvents(itemId){\n bouncex.et.on(bouncex.document, 'click.bx', function(){\n bouncex.push(['notify me', {'item:id': itemId}]);\n }, 'button[title=\"Tell Me When It\\'s Back\"]');\n}\n\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\n\nfunction getItemIdsCat() {\n \n if(window.wunderkindData && window.wunderkindData.collectionProductIds){\n return window.wunderkindData.collectionProductIds\n }\n \n var gtmID = bouncex.utils.url.getParam('id', jQuery('script[src*=\"googletagmanager\"]').attr('src'))\n \n var catDetail = gtmID && window.google_tag_manager[gtmID] ? bouncex.utils.gtmLookup('ecommerce') : false,\n catData = bouncex.utils.getNestedProp(\n 'impressions',\n {product_id: ''},\n catDetail\n );\n \n var ids = [];\n \n for (var i = 0; i < catData.length; i++) {\n if (catData[i].product_id) {\n ids.push(catData[i].product_id);\n }\n }\n \n if(ids.length > 0){\n return ids.join(',')\n }\n \n return getCatIdsFromNextData();\n}\n\nfunction getCatIdsFromNextData() {\n var parentCollection = JSON.parse(jQuery('#__NEXT_DATA__').text()).props.pageProps.collections;\n var ids = [];\n\n function containsId(id) {\n for (var i = 0; i < ids.length; i++) {\n if (ids[i] === id) {\n return true;\n }\n }\n return false;\n }\n if(parentCollection){\n parentCollection.forEach(function (e) {\n e.products.forEach(function (e2) {\n if (!containsId(e2.id)) {\n ids.push(e2.id);\n }\n });\n });\n }\n\n return ids.join(',') || false;\n}\n\nfunction getCategoryObject() {\n return {\n 'page:url': getPageUrl(),\n 'items:ids': getItemIdsCat()\n };\n}\n\nfunction getPageUrl() {\n return bouncex.website.pts === 'search' ? bouncex.utils.url.allowParams('q') : getUrl();\n}\n\n\n\nfunction fireCouplesEvents(){\n\tif(getUrl().indexOf(\"couples-matching-underwear\") > -1){\n\t\tbouncex.push(['matching_subscription']);\n\t}\n}\n\nfunction initializeCategoryEvents() {\n var categoryObj;\n\n bouncex.et.onTrue(\n function() {\n categoryObj = getCategoryObject();\n return !!categoryObj['items:ids'] && !!categoryObj['items:ids'].length &&\n !!categoryObj['page:url'];\n },\n function() {\n bouncex.push(['view category', categoryObj]);\n // initializeViewEvents();\n initializeVarATCTracking();\n fireVarSkuTracking();\n },\n 10\n );\n\n return;\n}\n\nfunction initializeViewEvents(){\n bouncex.et.onVarChange('qv_id', function(oldVal, newVal){\n \n var gtmID = bouncex.utils.url.getParam('id', jQuery('script[src*=\"googletagmanager\"]').attr('src'))\n \n if (gtmID && window.google_tag_manager[gtmID] && bouncex.utils.gtmLookup('ecommerce').detail && bouncex.utils.gtmLookup('ecommerce').detail.actionField && bouncex.utils.gtmLookup('ecommerce').detail.actionField.action !== 'detail'){\n fireViewItem(bouncex.vars.qv_id);\n initializeVarATCTracking();\n } else if(gtmID && window.google_tag_manager[gtmID] && bouncex.utils.gtmLookup('ecommerce').detail && bouncex.utils.gtmLookup('ecommerce').detail.products[0] && bouncex.vars.qv_id.toString() == bouncex.utils.gtmLookup('ecommerce').detail.products[0].product_id){\n \n fireViewItem(bouncex.vars.qv_id);\n initializeVarATCTracking();\n }\n });\n}\n\n\n/* ------------------------------- CART EVENTS ------------------------------ */\n\n// We're finding the last add to cart event and using data from that object for our ATC event.\nfunction getDlAtcId(){\n var arr = window.dataLayer,\n ecomObj,\n itemId,\n\t\tvariant;\n\n for (var i = arr.length - 1; i >= 0; i--) {\n if (arr[i].event === 'dl_add_to_cart'){\n \n ecomObj = arr[i],\n products = ecomObj.ecommerce.add.products;\n \n itemId = bouncex.utils.getNestedProp('ecommerce.add.products.0.product_id', '', ecomObj);\n variant = bouncex.utils.getNestedProp('ecommerce.add.products.0.variant', '', ecomObj);\n\n if (products.length > 1){\n itemId = bouncex.utils.getNestedProp('ecommerce.add.products.1.product_id', '', ecomObj);\n variant = bouncex.utils.getNestedProp('ecommerce.add.products.1.variant', '', ecomObj);\n }\n \n // If a user adds a product as a subscription (either monthly or annually) on a PDP or in QV, we want to fire a subscription event\n // and ATC with the subscription ID, not the product ID.\n if (variant.indexOf('Subscription') > -1){\n\t\t\t itemId = detectSubscriptionTypeAndPushEvent(itemId, true);\n } \n \n return itemId;\n }\n }\n}\n\nfunction getDlAtcVariant(){\n var arr = window.dataLayer,\n ecomObj,\n\t\tvariant;\n\n for (var i = arr.length - 1; i >= 0; i--) {\n if (arr[i].event === 'dl_add_to_cart'){\n ecomObjs = arr[i].ecommerce.add.products;\n if (ecomObjs.length > 1){\n variant = ecomObjs[1].variant || '';\n }\n\n return variant || false;\n }\n }\n}\n\n\nfunction trackCategoryATC(e){\n var itemID = window.wunderkindData.productId || window.wunderkindData.collectionProductIds[jQuery(e.currentTarget).parents('li').index()] || false\n\n bouncex.push(['add to cart',{'item:id': itemID }]);\n setVarAndCookie('cart_set', true);\n\n if (bouncex.vars.cart_id) { return; }\n\n trackShinestCookie()\n}\n\nfunction trackProductATC(e){\n \n var itemId = jQuery('[itemprop=\"productID\"]').attr('content')\n if (bouncex.website.pts === 'all_subscriptions'){\n itemId = bouncex.vars.sub_id;\n }\n \n bouncex.push(['add to cart',{'item:id': itemId }]);\n setVarAndCookie('cart_set', true);\n\n if (bouncex.vars.cart_id) { return; }\n\n trackShinestCookie()\n}\n\nfunction trackShinestCookie(){\n bouncex.et.onTrue(\n function() {\n cartId = localStorage['shinesty:shopify:cartId'];\n return cartId;\n },\n function() {\n bouncex.push(['cart_id', {'id': cartId}]);\n setVarAndCookie('cart_id', cartId);\n\n return;\n },\n 10\n );\n}\n\nfunction initializeVarATCTracking() {\n if(bouncex.website.pts === \"category\"){\n bouncex.off(jQuery(document), 'click.bxatc', '.inline-flex .absolute:visible button');\n bouncex.et.on(jQuery(document), 'click.bxatc', trackCategoryATC, '.inline-flex .absolute:visible button');\n }\n \n if(bouncex.website.pts === \"product\"){\n bouncex.et.on(jQuery(document), 'click.bxatc', trackProductATC, '#add_to_cart');\n }\n\n bouncex.et.onVarChange('cart_total_gtm', function(oldVal, newVal){\n\n var cartId,\n itemId = getDlAtcId(),\n variant = getDlAtcVariant();\n\n //This still gets called when removing items. Check to make sure we dont fire ATC\n if(oldVal > newVal){\n return;\n }\n\n if (bouncex.website.pts === 'all_subscriptions'){\n itemId = bouncex.vars.sub_id;\n }\n\n if (!itemId){ return; }\n\n bouncex.push(['add to cart',{'item:id': itemId }]);\n setVarAndCookie('cart_set', true);\n\n if (bouncex.vars.cart_id) { return; }\n\n trackShinestCookie()\n\n return;\n });\n}\n\nfunction trackCartChange() {\n bouncex.et.onVarChange('cart_qty', function(oldVal, newVal) {\n if (newVal > oldVal){ return; }\n\n if (bouncex.vars.cart_set && newVal === 0) {\n bouncex.push(['empty_cart']);\n setVarAndCookie('cart_set', false);\n setVarAndCookie('cart_total_gtm', 0);\n }\n\n return;\n });\n\n return;\n}\n\nfunction initializeCartEvents() {\n trackCartChange();\n if(bouncex.website.pts !== \"category\" && bouncex.website.pts !== \"product\"){\n initializeVarATCTracking();\n }\n \n if (bouncex.utils.url.getParam('cartId').length && !bouncex.vars.replen_success){\n replenishmentSuccessful();\n }\n\n return;\n}\n\n// If the cartId in the param matches the cartId in localStorage and the cart_qty > 0,\n// we set an RTV for replen_success to true if needed for continuities.\nfunction replenishmentSuccessful(){\n bouncex.setTimeout2(function(){\n if (!bouncex.vars.cart_qty){\n return;\n }\n\n var paramCartId = bouncex.utils.url.getParam('cartId'),\n localCartId = localStorage['shinesty:shopify:cartId'] || '';\n\n if (paramCartId === localCartId){\n setVarAndCookie('replen_success', true);\n }\n }, 1000);\n}\n\n/* ------------------------------ USER TRACKING ----------------------------- */\n\nfunction initializeUserTracking() {\n if (!bouncex.vars.logged_in || bouncex.vars.logged_in_identified) {\n return;\n }\n\n var userEmail = bouncex.utils.getNestedProp('customer.email', '') || bouncex.utils.getNestedProp('heap.identity', '') || jQuery('#customer_detail .email.note').text().trim();\n\n if (!bouncex.utils.validate.email(userEmail)) {\n return;\n }\n\n bouncex.push([\n 'user',\n {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }\n ]);\n setVarAndCookie('logged_in_identified', true);\n\n return;\n}\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\n\nfunction isValidDomain() {\n return getUrl().indexOf('www.shinesty.com') > -1 || getUrl().indexOf('account.shinesty.com') > -1;\n}\n\nfunction isEn() {\n return jQuery('html').attr('lang') === 'en' || (window.navigator && window.navigator.language === 'en-US');\n}\n\nfunction init() {\n\n if (!isValidDomain() || !isEn()) {\n return;\n }\n\n initializeUserTracking();\n initializeCartEvents();\n\n switch(bouncex.website.pts) {\n case 'category':\n case 'search':\n initializeCategoryEvents();\n\t\t\t fireCouplesEvents();\n break;\n case 'product':\n initializeItemEvents();\n break;\n case 'all_subscriptions':\n clickToViewSubscription();\n break;\n default:\n break;\n }\n\n return;\n}\n\ninit();\n","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"all_subscriptions":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/all-subscriptions"}]]},"cart":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"/\\/cart/.test(window.location.pathname);"}],[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"shinesty.com"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"/\\/collections\\/(?!.*\\/products\\/)/.test(window.location.pathname);"}],[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"shinesty.com"}]]},"checkout":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"/\\/checkout/.test(window.location.pathname);"}],[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"shinesty.com"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === '/' && !/shopifypreview/.test(window.location.href);"}],[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"shinesty.com"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"/\\/products\\//.test(window.location.pathname);"}],[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"shinesty.com"}]]},"search":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"/\\/search/.test(window.location.pathname);"}],[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"shinesty.com"}]]}},"els":{"CART - Checkout Button":".mini-cart-checkout-wrapper div.col-xs-12:not(.note_container)","CART - Promo Code Apply Button":".order-summary__section--discount button","CART - Promo Code Box":"input#checkout_reduction_code","CAT - Product Grid Image":"","Footer":".footer","Navigation bar":".row.fixit:visible","PDP - Add to Cart Button":"","PDP - Hero Image":".product_image_container","PDP - Product Name":".product_name:visible","PDP - Product Price":".product_info_container .modal_price:visible","PDP - Size Option":"#select_smaller_2","SEARCH - Product Grid Image":""},"vars":[{"name":"logged_in","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if(window.location.href.indexOf('/account/login') > -1) {\n return false;\n } else if(!!bouncex.utils.getNestedProp('customer.email')) {\n return true;\n } else {\n return null;\n }\n})();","trigger":""},{"name":"ever_logged_in","polling":"all","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 var checkoutQty = 0;\n jQuery('.product-thumbnail__quantity').each(function() {\n checkoutQty += parseInt(jQuery(this).text());\n });\n\n return jQuery('button[title$=\"Cart\"]').first().text() || checkoutQty;\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"jQuery('.total-line--subtotal .total-line__price').text().replace(/[^0-9.]/g, '')\n || jQuery('div[aria-modal=\"true\"] div:contains(\"Subtotal\")').last().text().replace(/[^0-9.]/g, '')\n || null;","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"Number(jQuery('meta[itemprop=\"price\"]').attr('content'))","trigger":""},{"name":"prod_name","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('wunderkindData.productTitle');","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('#add_to_cart').length > 0;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('p span:contains(Felt good)').is(':visible') || null;","trigger":""},{"name":"item_id","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('wunderkindData.productId');","trigger":""},{"name":"items_ids","polling":"none","persist":"no","page_types":["category","search"],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('wunderkindData.collectionProductIds', []).join(',');","trigger":""},{"name":"item_category","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('wunderkindData.productTitle');","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.location.origin + window.location.pathname;","trigger":""},{"name":"item_copy","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"document.title.split(\"|\").shift().trim();","trigger":"pageload"},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_set","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"previous_sku","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"subscriptions_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var subscriptionTypes = [\n [\"boxer\", \"boxer\"],\n [\"trunks\", \"boxer\"],\n [\"brief\", \"boxer\"],\n [\"cheeky\", \"cheeky\"],\n [\"bikini\", \"bikini\"],\n [\"thong\", \"thong\"],\n [\"matching\", \"couples\"],\n [\"boyshort\", \"boyshort\"]\n ],\n subSelector = jQuery('.product__description__property:contains(\"isSubscription: true\") ~ span:contains(\"subscriptionTitle:\")').first().text().toLowerCase();\n\n \n if ((bouncex.website.pts ===\"checkout\" || window.location.href.indexOf('subscription/checkout') > -1) && !!subSelector) {\n \n for (var i = 0; i < subscriptionTypes.length; i++) {\n if (subSelector.indexOf(subscriptionTypes[i][0]) > -1) {\n return subscriptionTypes[i][1];\n }\n } \n }\n })();","trigger":"pageload"},{"name":"cart_id","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":"replen_success","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"sku","polling":"vars","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var feedID = \"\";\n\n var $form = jQuery('form:visible').first();\n if ($form.length) {\n var $input = $form.find('div[class*=\"hover\"]').siblings('input');\n if ($input.length) {\n var value = $input.attr('value');\n if (value) {\n var splitArray = value.split('/');\n if (splitArray.length > 1) {\n feedID = splitArray.pop();\n }\n }\n }\n }\n \n if (feedID === \"\") {\n var nextData = JSON.parse(jQuery('#__NEXT_DATA__').text());\n if (nextData && nextData.props && nextData.props.pageProps && nextData.props.pageProps.product && nextData.props.pageProps.product.variants && nextData.props.pageProps.product.variants.length > 0) {\n feedID = nextData.props.pageProps.product.variants[0].id.split('/').pop() || false;\n }\n }\n return feedID;\n})();","trigger":"pageload"},{"name":"prev_sku","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_total_gtm","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var gtmID = bouncex.utils.url.getParam('id', jQuery('script[src*=\"googletagmanager\"]').attr('src'));\n \n return gtmID && window.google_tag_manager[gtmID] ? bouncex.utils.gtmLookup('cart_total') : jQuery('[title=\"Open Cart\"] span:first').text().trim() || 0;\n})()","trigger":"pageload"},{"name":"qv_id","polling":"all","persist":"visit","page_types":["category","product","search"],"testmode":false,"default":"false","code":"(function(){\n var gtmID = bouncex.utils.url.getParam('id', jQuery('script[src*=\"googletagmanager\"]').attr('src'));\n \n if(gtmID && window.google_tag_manager[gtmID]){\n return bouncex.utils.gtmLookup(\"ecommerce\") && bouncex.utils.gtmLookup(\"ecommerce\").detail && bouncex.utils.gtmLookup(\"ecommerce\").detail.products[0].product_id;\n }\n return false;\n})()","trigger":"pageload"},{"name":"sub_id","polling":"none","persist":"no","page_types":["all_subscriptions"],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_names","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function(){\n\tvar names = [],\n\t\t$cartNames = jQuery('.px-2 .mt-2, .px-2 span.tracking-wider[class*=\"text-\"]'),\n\t\tcurrName;\n\n\t\t$cartNames.each(function(i) {\n\t\t\tcurrName = $cartNames.eq(i).text().trim();\n\n\t\t\tif (currName) {\n\t\t\t\tnames.push(currName);\n\t\t\t}\n\t\t})\n\n\t\treturn names.join(',') || null;\n})();","trigger":"pageload"},{"name":"cart_images","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function(){\n\tvar imgs = [],\n\t\t$cartImgs = jQuery('.items-center .flex-grow img[data-nimg=\"intrinsic\"], .px-2 img[alt=\"placeholder icon\"]'),\n\t\tcurrImg;\n\n\t\t$cartImgs.each(function(i) {\n\t\t\tcurrImg = $cartImgs.eq(i).attr('src');\n\n\t\t\tif (currImg) {\n\t\t\t\timgs.push(currImg);\n\t\t\t}\n\t\t})\n\n\t\treturn imgs.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":1,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"bxid":"espemailid"},"cus":"","miw_exclude":"#conjured_emails","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 */\nvar segments = {\n /* PROPERTIES */\n testMode: false,\n interceptEnabled: true,\n mirrorEnabled: false,\n dlWatcherEnabled: true,\n /* METHODS */\n /* Intercept Events */\n useIntercept: function() {\n if (this.interceptEnabled) {\n bouncex.utils.shqInterceptEvent = {\n 'cartAdd': true,\n 'categoryView': true,\n 'productView':true,\n 'purchase': function(wkndEventParams){\n\t\t\t var prodErr = false;\n\t\t\t var orderId = bouncex.utils.getNestedProp('obj.order_id', null, wkndEventParams);\n\t\t\t var purchTotal =Number(bouncex.utils.getNestedProp('obj.amount', 0, wkndEventParams)) - ( Number(bouncex.utils.getNestedProp('obj.tax', 0, wkndEventParams)) + Number(bouncex.utils.getNestedProp('obj.shipping', 0, wkndEventParams)) );\n\t\t\t var orderInfo = bouncex.utils.getNestedProp('obj.item', null, wkndEventParams);\n\t\t\t var orderArray = orderInfo && orderInfo.map(function (ea) {\n\t\t\t\t return { productId: ea.product_id, price: ea.price, qty: ea.quantity };\n\t\t\t });\n\t\t\t\t \n\t\t\t \tif (orderArray.length < 1) {\n\t\t\t prodErr = true;\n\t\t\t }\n\t\t\t \n\t\t\t if (!prodErr && orderId){\n\t\t\t \t\t_shq.push(['pageView', \n\t\t\t \t {\n\t\t\t \t 'pageType': 'purchase', \n\t\t\t \t\t \t'orderItems' : orderArray,\n\t\t\t \t\t \t'orderId': orderId,\n\t\t\t \t\t \t'total': purchTotal\n\t\t\t \t\t}]);\n\t\t\t }else{\n\t\t\t \t_shq.push(['pageView', \n\t\t\t \t {\n\t\t\t \t 'pageType': 'purchase', \n\t\t\t 'orderId' : orderId,\n\t\t\t 'usebasket': true\n\t\t\t \t\t}]);\n\t\t\t }\n \t\t\t}\n };\n }\n },\n dlFuncs: function (e) {\n var sEvent = \"\", eObj;\n \n //Get the Ecommerce Obj\n for(i=0; i < e.length; i++){\n var thisOne = e[i];\n if(thisOne.ecommerce && thisOne.event){\n sEvent = thisOne.event;\n eObj = thisOne;\n }\n }\n \n //PDP\n if (sEvent === 'dl_view_item') {\n var pID = eObj?.ecommerce?.detail?.products[0]?.product_id;\n if(pID){\n _shq.push(['pageView',\n {\n 'pageType': 'product',\n 'productId': pID.toString()\n }]);\n }\n }\n if(sEvent === 'dl_view_item_list'){\n this.captureCategory();\n }\n //Cart\n if(sEvent === 'dl_view_cart'){\n this.captureCart(eObj);\n }\n //Add to Cart\n if(sEvent === 'dl_add_to_cart'){\n this.captureATC(eObj);\n }\n //Remove Cart\n if(sEvent === 'dl_remove_from_cart'){\n this.removeCart(eObj);\n }\n if(sEvent === 'dl_search_results'){\n var searchTerm = bouncex.utils.getParam('q').replace(/\\+/gi,' ');\n if (searchTerm){\n _shq.push([ 'pageView', \n {\n 'pageType': 'search',\n 'searchPhrase': searchTerm\n }]);\n }\n }\n },\n \n WatchArray: function (a, cb, settings = {}){\n let len = settings.catchUp ? 0 : a.length,\n getUpdatedArr = () => settings.filter ? a.filter(settings.filter) : [...a];\n arr = getUpdatedArr();\n watcher = () => {\n let arrUpdated = getUpdatedArr();\n //console.log(len, arrUpdated.length, len < arrUpdated.length);\n if(len < arrUpdated.length){\n let deltaStart = arrUpdated.length - (arrUpdated.length - len);\n //console.log(\"delta start\", deltaStart, len, arrUpdated.length, len < arrUpdated.length)\n len = arrUpdated.length;\n let delta = arrUpdated.splice(deltaStart);\n this.subs.forEach(e => e(delta));\n }\n setTimeout(watcher, (settings.intervalMs || 1000)); \n };\n this.subs = [];\n this.removeSub = i => this.subs.splice(i,1);\n this.replaceSub = (i, f = () => {}) => this.subs.splice(i, 1, f);\n if(cb){this.subs.push(cb)};\n watcher();\n },\n removeCart: function(obj){\n var prodId = bouncex.utils.getNestedProp('ecommerce.remove.products[0].variant_id','',obj); \n var qty = bouncex.utils.getNestedProp('ecommerce.remove.products[0].quantity','',obj); \n \n if(prodId){\n _shq.push([ 'onCartRemove', { \n Items: [{\n 'ProductId': prodId,\n 'Quantity': qty\n }], \n }]);\n }\n },\n captureCart: function(obj){\n var arrItems = bouncex.utils.getNestedProp('ecommerce.impressions',[],obj);\n if (arrItems && arrItems.length > 0) {\n var cartTotal = bouncex.utils.getNestedProp('cart_total',0,obj);\n var cartItems = arrItems.map(function (ea) {\n return { ProductId: ea.variant_id, UnitPrice: ea.price, Quantity: ea.quantity };\n });\n \n if (cartItems && cartTotal > 0) {\n _shq.push([ 'onCartView', { \n \"Items\": cartItems,\n \"Total\": cartTotal\n }]);\n }\n }else{\n _shq.push(['onCartEmpty']);\n }\n },\n captureATC: function(obj){\n\t\tvar prodId = bouncex.utils.getNestedProp('ecommerce.add.products[0].variant_id','',obj);\n\t\tvar price = bouncex.utils.getNestedProp('ecommerce.add.products[0].price','',obj);\n\t\tvar qty = bouncex.utils.getNestedProp('ecommerce.add.products[0].quantity','',obj);\n\t\tvar atcArray = [];\n \n if(prodId && qty && price){\n atcArray.push({\n 'ProductId': prodId,\n 'UnitPrice': price,\n 'Quantity': qty\n });\n if (atcArray){\n \t_shq.push(['onCartAdd', {'Items': atcArray }]);\n }\n }\n },\n captureCategory: function(){\n\t\tvar catCode = bouncex.utils.url.removeParams().split('/').pop().trim();\n\t\tif (catCode){\n _shq.push([ 'pageView', \n {\n 'pageType': 'category',\n 'catName': catCode,\n 'catId': catCode\n }]);\n }\n },\n captureEmail: function(){\n var sURL = bouncex.utils.getNestedProp('location.href','',window).split('/').pop();\n var accEmail = document.querySelector(\"input[id='customer_email']\") || document.querySelector(\"input[id='email']\");\n\n \tif (accEmail){\n \t accEmail.addEventListener('change', function(){\n \t if(accEmail.value){\n _shq.push([ 'onEmail', \n {\n 'email': accEmail.value,\n 'type': 'account'\n }]);\n \t }\n \t });\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.captureEmail();\n var watchyTower = new this.WatchArray(window.dataLayer, function(a){segments.dlFuncs(a)}, {catchUp: false}); \n }\n}\n\nsegments.init();","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 Shinesty mktg txts (like cart reminders) to this #, per terms.","eventSharing":true,"shqId":"nhvkd095to-1","enabled":1},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"#conjured_emails","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":"354512592","ga4_measurement_id":"G-99C5J4EW70"} ; 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":"e2e1dbb7c70b701b3c197204872400a0","creativesBaseStyles":"a53944a2","gpsAuction":"1375a7b38c31e98d14fe7f396b72da14","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.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_1247731b761376f768004922730ab4f3.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); } 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(); }})();