(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":4425,"name":"Diane Von Furstenberg - World ","cookie_name":"bounceClientVisit4425","domain":"world.dvf.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"(function() {\n var customerCvarName = 'ucrm_customer';\n var subscriberCvarName = 'ucrm_subscriber';\n var pollingInterval = 200;\n var polls = 0;\n var maxPolls = 50;\n var checkBxIdAndCustomerStatus = function(){\n if (bouncex.vars[customerCvarName] === null || bouncex.vars[customerCvarName] === 0 || bouncex.vars[subscriberCvarName] === null || bouncex.vars[subscriberCvarName] === 0) {\n if (window.bxgraph && bxgraph.IDs && bxgraph.IDs.deviceID && bxgraph.IDs.cookieID) {\n jQuery.ajax({\n url: \"https://pd.cdnwidget.com/lookup?deviceID=\" + bxgraph.IDs.deviceID + \"&cookieID=\" + bxgraph.IDs.cookieID + \"&bxwid=\" + bouncex.website.id,\n success: function(e) {\n \tvar customerData;\n \tvar overlayVisible;\n \t\n \tfor (var ca_id in bouncex.campaigns) {\n \t var campaign = bouncex.campaigns[ca_id];\n if (bouncex.campaigns.hasOwnProperty(ca_id) && campaign.type === 'overlay' && campaign.ad_visible && campaign.obj1.find('input[name=email]').length > 0) {\n overlayVisible = true;\n }\n }\n \n \tif (typeof e.isPreviousCustomer !== 'undefined' && typeof e.isSubscriber !== 'undefined') {\n \t\tcustomerData = {isPreviousCustomer: e.isPreviousCustomer, isSubscriber: e.isSubscriber};\n \t} else {\n \t\tcustomerData = bouncex.parseJSON(e, {isPreviousCustomer: \"unknown\", isSubscriber: \"unknown\"});\n \t}\n \t\n \tif (!overlayVisible) {\n bouncex.setVarAndReload(customerCvarName, customerData.isPreviousCustomer);\n bouncex.setVarAndReload(subscriberCvarName, customerData.isSubscriber);\n \t} else {\n \t bouncex.setv(customerCvarName, customerData.isPreviousCustomer);\n bouncex.setv(subscriberCvarName, customerData.isSubscriber);\n bouncex.setBounceCookie();\n \t}\n }\n });\n } else {\n if (polls++ >= maxPolls) {\n return;\n }\n setTimeout(checkBxIdAndCustomerStatus, pollingInterval);\n }\n }\n };\n setTimeout(checkBxIdAndCustomerStatus, pollingInterval);\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};","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":1,"gmp":0,"whitelist_check":1},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"var configObj = {\n\t\t'4401': {\n\t\t\twebsiteUrl: 'www.dvf.com/',\n\t\t\ttrackCatalogue: true\n\t\t},\n\t\t'4423': {\n\t\t\twebsiteUrl: 'europe.dvf.com/',\n\t\t\ttrackCatalogue: true\n\t\t},\n\t\t'4424': {\n\t\t\twebsiteUrl: 'uk.dvf.com/',\n\t\t},\n\t\t'4425': {\n\t\t\twebsiteUrl: 'world.dvf.com/',\n\t\t\ttrackCatalogue: true\n\t\t}\n\t},\n\tconfig = configObj[bouncex.website.id],\n\tCOOKIE_NAME = 'cart',\n\tCLEAN_URL = bouncex.utils.url.allowParams(['q']);\n\n/** ************************ HELPERS ***************************/\n\nfunction isValidForTracking() {\n\treturn CLEAN_URL.indexOf(config.websiteUrl) > -1\n\t\t&& jQuery('html').attr('lang').indexOf('en') > -1;\n}\n\nfunction getProdIdFromUrl(url) {\n\turl = url.split('/products/')[1];\n\n\tvar\tidCheck = /[0-9A-Za-z-]*/g,\n\t\tmatch = url.match(idCheck);\n\n\treturn match ? match[0] : '';\n}\n\nfunction getMetaPageTitle() {\n\treturn jQuery('meta[property=\"og:title\"]').attr('content') || '';\n}\n\n/** ************************ ITEM ***************************/\n\nfunction getItem() {\n\tvar pdpUrl = jQuery('meta[property=\"og:url\"]').attr('content') || CLEAN_URL;\n\treturn {\n\t\tid: getProdIdFromUrl(pdpUrl),\n\t\tcopy: getMetaPageTitle(),\n\t\tcategory: bouncex.utils.getNestedProp('ShopifyAnalytics.meta.product.type') || 'global',\n\t\turl: pdpUrl,\n\t\timageurl: jQuery('meta[property=\"og:image\"]').attr('content') || '',\n\t\tinstock: bouncex.vars.in_stock,\n\t};\n}\n\nfunction initCatalogueListener(itemId, groupId) {\n\tvar lastFiredSku;\n\tbouncex.et.on(jQuery('.SizeSwatch'), 'click.bx', function () {\n\t\t// we are setting a short timeout because the variant changes right after the click.\n\t\tbouncex.setTimeout2(function() {\n\t\t\tvar sku = bouncex.utils.url.getParam('variant') || '';\n\t\t\tif (sku && sku !== lastFiredSku) {\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': groupId,\n\t\t\t\t\t\t'item:feedid': sku\n\t\t\t\t\t}\n\t\t\t\t]);\n\t\t\t\tlastFiredSku = sku;\n\t\t\t}\n\t\t}, 500);\n\t});\n}\n\nfunction fireViewItem(id, groupId) {\n var pushItem = { 'item:id': id };\n\n if (groupId) {\n pushItem['item:itemgroupid'] = groupId;\n }\n bouncex.push(['view item', pushItem]);\n}\n\nfunction initializeItemEvents() {\n var item,\n\t\tgroupId;\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 },\n function () {\n bouncex.push(['item', item]);\n\n\t\t\tif (config.trackCatalogue) {\n\t\t\t\tgroupId = jQuery('.product_id').first().text();\n\t\t\t\tinitCatalogueListener(item.id, groupId);\n\t\t\t}\n\n fireViewItem(item.id, groupId);\n\n bouncex.et.on(jQuery('.ProductForm__AddToCart[data-action=\"add-to-cart\"]'), 'click.bx', function () {\n\t\t\t\taddItemToCart(item.id);\n\t\t\t});\n },\n 10\n );\n}\n\n/** *********************** CATEGORY **************************/\n\nfunction getCategoryIds() {\n\treturn jQuery('#main a').map(function () {\n\t\tvar url = jQuery(this).attr('href') || '',\n\t\t\tprodId = getProdIdFromUrl(url);\n\t\tif (prodId) {\n\t\t\treturn prodId;\n\t\t}\n\t}).toArray().join(',');\n}\n\nfunction getCategoryObject() {\n return {\n 'page:title': bouncex.vars.search_page ? 'Search' : getMetaPageTitle(),\n 'page:url': bouncex.vars.search_page ? bouncex.utils.url.allowParams(['q']) : CLEAN_URL,\n 'items:ids': getCategoryIds()\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\t\t\t\t!!categoryObj['page:title'];\n },\n function () {\n bouncex.push(['view category', categoryObj]);\n },\n 10\n );\n}\n\n/** ************************* CART ****************************/\n\nfunction replenish(cart) {\n\tbouncex.utils.cookies.create({ name: COOKIE_NAME, value: cart.token });\n\twindow.location.href = window.location.pathname + '?bx_replen=true';\n}\n\nfunction emptyCart() {\n\tbouncex.et.onVarChange('cart_qty', function () {\n\t\tif (bouncex.vars.cart_qty === 0 && bouncex.vars.cart_set) {\n\t\t\tbouncex.push(['empty_cart', {}]);\n\t\t\tbouncex.setVar('cart_set', false);\n\t\t}\n\t});\n}\n\nfunction initializeCartEvents() {\n\tbouncex.et.cart.init({\n\t\treplenishmentType: 'cookie',\n\t\treplenish: replenish,\n\t});\n\temptyCart();\n}\n\nfunction addItemToCart(itemId) {\n\tvar cookie;\n\tbouncex.et.onTrue(function () {\n\t\tcookie = bouncex.getBounceCookie(COOKIE_NAME);\n\t\treturn cookie;\n\t}, function () {\n\t\tbouncex.push([\n\t\t\t'add to cart',\n\t\t\t{ 'item:id': itemId, 'cart:token': cookie }\n\t\t]);\n\t\tif (!bouncex.vars.cart_set) {\n\t\t\tbouncex.setVar('cart_set', true);\n\t\t}\n\t}, 5);\n}\n\nfunction initializeQuickAddToCart(){\n\tbouncex.et.on(bouncex.document, 'click.bxatc', function () {\n\t\tvar url = jQuery(this).closest('a').attr('href'),\n\t\t\titemId = getProdIdFromUrl(url);\n\n\t\tif (itemId){\n\t\t\taddItemToCart(itemId);\n\t\t}\n\t}, '.ns-size');\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;\n\n bouncex.et.onTrue(\n function () {\n userEmail = !!bouncex.infoStore && !!bouncex.infoStore.get().email && bouncex.infoStore.get().email;\n return bouncex.utils.validate.email(userEmail);\n },\n function () {\n bouncex.push([\n 'user',\n {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }\n ]);\n bouncex.setVar('logged_in_identified', true);\n },\n 5\n );\n}\n\nfunction listenForLogin() {\n\tbouncex.et.on(jQuery('form[action=\"/account/login\"],#create_customer'), 'submit.bx', function () {\n\t\tbouncex.infoStore.set({\n\t\t\temail: jQuery('input[name=\"customer[email]\"]').val()\n\t\t});\n\t});\n}\n\n/** ***************** INITIALIZE EVENTS *********************/\n\nfunction init() {\n if (!isValidForTracking()) {\n return;\n }\n\n initializeQuickAddToCart();\n\tinitializeCartEvents();\n\tinitializeUserTracking();\n\n\tbouncex.et.onVarChange('search_page', function (oldVal, newVal) {\n\t\tif (newVal) {\n\t\t\tinitializeCategoryEvents();\n\t\t}\n\t});\n\n\tif (window.location.href.indexOf('/login') > -1 || window.location.href.indexOf('/register') > -1) {\n\t\tlistenForLogin();\n\t}\n\n switch (bouncex.website.pts) {\n case 'category':\n\t\tcase 'search':\n initializeCategoryEvents();\n break;\n case 'product':\n initializeItemEvents();\n break;\n default:\n break;\n }\n}\n\ninit();\n","dge":false,"bxidLoadFirst":false,"pie":false,"cme":false,"gbi_enabled":0,"bpush":false,"pt":{"blog":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/info"}],[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('globalData.pageType', '') === 'blog landing';"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('globalData.pageType', '') === 'blog';"}]]},"cart":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.template-cart').length === 1;"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('meta.page.pageType') === 'collection';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"search?q="}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"checkouts"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"previous_step"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('meta.page.pageType') === 'home';"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('meta.page.pageType') === 'product';"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search?q"}]]}},"els":{"blank_site_element":"","skip_link":".PageSkipLink"},"vars":[{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"!!bouncex.utils.getNestedProp('__st.cid', false);","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 var count = 0;\n if (bouncex.website.pts === 'checkout') {\n jQuery('#order-summary .product-thumbnail__quantity').each(function() {\n count += Number(jQuery(this).text());\n });\n return count;\n }\n return Number(jQuery('.Header__CartCount').text().replace(/[^0-9.]/g,'')[0]);\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"(function() {\n if (bouncex.website.pts === 'checkout') {\n return Number(jQuery('.order-summary__section .total-line--subtotal .total-line__price').text().replace(/[^0-9.]/g, ''));\n }\n return Number(jQuery('.Cart__Subtotal span').text().replace(/[^0-9.]/g,''));\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(jQuery('meta[property=\"product:price:amount\"]').attr('content') || 0).replace(/[^0-9.]/g,'');","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('meta[property=\"og:title\"]').attr('content');","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.ProductForm__AddToCart').text().toUpperCase().indexOf('SOLD OUT') < 0;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('5D=newsletter&form_type=customer') > -1 || window.location.href.indexOf('customer_posted=true') > -1 || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"cart_token","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_items","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cookie_modal_present","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"water_for_life","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"jQuery('.cart-subtotal').length > 0? (jQuery('.cart-item').text().indexOf('Water for Life') > -1) : bouncex.vars.water_for_life;","trigger":""},{"name":"discount_code","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"0","code":"bxPopTrigger.DiscountCode;","trigger":""},{"name":"dollars_saved_prod","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function(){\n var $waterForLifeOption = jQuery('.price-radio-button.product-wfl-price:checked');\n var $productSummary = jQuery('.pdp-price');\n var $listPrice = $productSummary.find('.sales span.pdp-strike-through-price del:contains(\"$\")');\n var $yourPrice = $productSummary.find('.sales span.value');\n var savedDollars = 0;\n if ($waterForLifeOption.length > 0) {\n return 0;\n }\n if ($productSummary.length > 0 && $listPrice.length > 0 && $yourPrice.length > 0) {\n var listPrice = parseFloat(jQuery.trim($listPrice.text()).replace(/[^0-9\\.]/g, '')); \n var yourPrice = parseFloat(jQuery.trim($yourPrice.text()).replace(/[^0-9\\.]/g, '')); \n savedDollars = listPrice - yourPrice;\n savedDollars = !isNaN(savedDollars)? savedDollars.toFixed(2) : 0;\n }\n return savedDollars;\n})();","trigger":""},{"name":"percent_saved_prod","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function(){\n var $waterForLifeOption = jQuery('.price-radio-button.product-wfl-price:checked');\n var $productSummary = jQuery('.pdp-price');\n var $listPrice = $productSummary.find('.sales span.pdp-strike-through-price del:contains(\"$\")');\n var $yourPrice = $productSummary.find('.sales span.value');\n var savedPercent = 0;\n if ($waterForLifeOption.length > 0) {\n return 0;\n }\n if ($productSummary.length > 0 && $listPrice.length > 0 && $yourPrice.length > 0) {\n var listPrice = parseFloat(jQuery.trim($listPrice.text()).replace(/[^0-9\\.]/g, '')); \n var yourPrice = parseFloat(jQuery.trim($yourPrice.text()).replace(/[^0-9\\.]/g, ''));\n var priceDifference = listPrice - yourPrice;\n savedPercent = (priceDifference/listPrice)*100;\n savedPercent = !isNaN(savedPercent)? Math.round(savedPercent): 0;\n }\n return savedPercent;\n})();","trigger":""},{"name":"ibx_test","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('ibx_test') > -1 || null;","trigger":""},{"name":"products_tracked","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"localStorage.getItem('bxProdHist') && JSON.parse(localStorage.getItem('bxProdHist')).length || null;","trigger":""},{"name":"product_page","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"true;","trigger":""},{"name":"category_page","polling":"none","persist":"no","page_types":["category"],"testmode":false,"default":"false","code":"true;","trigger":""},{"name":"cart_plurality_qualifies","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.cart_items > 1 ? 'qualify' : 'qualifies';","trigger":""},{"name":"cart_plurality","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.cart_items > 1 ? 'items' : 'item';","trigger":""},{"name":"bx_test","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":""},{"name":"imageurl","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if(jQuery('.img-gallery').find('img').eq(0).attr('src') !== undefined){\n return window.location.protocol+jQuery('.img-gallery').find('img').eq(0).attr('src');\n }else{\n if(jQuery('#productImage').attr('src') !== undefined){\n return window.location.protocol+jQuery('#productImage').attr('src');\n }else{\n if(typeof bxProduct != 'undefined' && bxProduct.bouncex_product_image){\n return window.location.protocol+bxProduct.bouncex_product_image;\n }else{\n return 'https://cdn.aquasana.com/images/products/aq-pwfs-p-b_218.jpg';\n }\n }\n }\n })()","trigger":""},{"name":"prod_category","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function (){\n\tvar url = window.location.href;\n\tif (typeof url !== 'string'){ return false; }\n\tvar categoryMatch = url.match(/.com\\/([-\\w]+)/);\n\tif (categoryMatch && categoryMatch[1]){\n\t\treturn decodeURIComponent(categoryMatch[1]).split('-').map(function(w) {\n\t\t return w.replace(/(^| )(\\w)/g, function(x) {\n return x.toUpperCase();\n })\n\t\t}).join(' ');\n\t}\n})()","trigger":""},{"name":"category_title","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#hero-cat h1').text().replace(/\\s+/g,' ').trim() || null;","trigger":""},{"name":"cart_quantity","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"0","code":"jQuery('span.counter:first').text() ? parseInt(jQuery('span.counter:first').text().match(/\\d+/g)[0]) : 0;","trigger":"pageload"},{"name":"added_cart_item","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"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":"ucrm_customer","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"0","code":"null;","trigger":"pageload"},{"name":"ucrm_subscriber","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"0","code":"null;","trigger":"pageload"},{"name":"utm_term","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n\tvar utm_term = bouncex.utils.getParam('utm_term');\n\tif(utm_term) {\n \t\treturn utm_term.replace(/\\W+/g, \"\");\n\t}\n\treturn null;\n})();","trigger":"pageload"},{"name":"search_page","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('/search?q=') > -1;","trigger":"pageload"},{"name":"page_type","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts;","trigger":"pageload"},{"name":"location_overlay_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.md-modal__content form[action=\"/localization\"]').is(':visible');","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":"SinglePageApp.setCustomParams({\n currentPageIdentifier: function() {\n return bouncex.utils.url.allowParams('q');\n }\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: true,\n pageView: true,\n cartAdd: function () {\n segments.getCart();\n var ProductId = document.querySelector(\n 'input[name=\"variant\"]'\n )?.value;\n var product = ShopifyAnalytics.meta.product.variants.filter(\n (item) => {\n return item?.id == ProductId;\n }\n ),\n Quantity = document.querySelector('input[name=\"quantity\"]')?.value;\n if (product.length > 0) {\n var UnitPrice = product[0]?.price / 100;\n if (UnitPrice && ProductId) {\n _shq.push([\n \"onCartAdd\",\n {\n Items: [\n {\n ProductId,\n UnitPrice,\n Quantity,\n },\n ],\n },\n ]);\n }\n }\n },\n cartEmpty: false,\n categoryView: false,\n purchase: function (wkData) {\n // use as needed\n var oid =\n bouncex.utils.getNestedProp(\"obj.order_id\", null, wkData) ||\n \"no-orderid-\" + Math.floor(Math.random() * 100000000);\n _shq.push([\n \"pageView\",\n {\n pageType: \"purchase\",\n orderId: oid,\n usebasket: true,\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 reloadcampaigns: (wkData) => {\n if (wkData?.params?.page_type === \"cart\" && wkData?.params['reloadcampaigns:type'] == \"cart_qty,cart_value\") {\n segments.getCart();\n }\n },\n pageview: function (wkData) {\n if (bouncex.website.pts == \"search\") {\n var searchTerm = bouncex.utils.url.queryStringToObject(\n window.location.href\n ).q;\n if (searchTerm) {\n _shq.push([\n \"pageView\",\n {\n pageType: \"search\",\n searchPhrase: decodeURI(searchTerm).replace(/\\+/gi, \" \"),\n },\n ]);\n }\n }\n if (bouncex.website.pts == \"cart\") {\n segments.getCart();\n }\n },\n \"add to cart\": false,\n \"view item\": function (wkData) {\n var prodID = document.querySelector('input[name=\"variant\"]')?.value;\n if (!!prodID) {\n _shq.push([\n \"pageView\",\n {\n pageType: \"product\",\n productId: prodID\n },\n ]);\n }\n },\n select_sku: false,\n item: false,\n eligible: false,\n pop: false,\n visit: false,\n };\n }\n },\n setCartWatcher: () => {\n var cartEventCounter = 0;\n var mutationObserver = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n if ([...mutation?.target?.classList].includes('PageOverlay') && [...mutation?.target?.classList].includes('is-visible') && cartEventCounter < 1) {\n segments.getCart();\n cartEventCounter++;\n };\n });\n });\n mutationObserver.observe(document.documentElement, {\n attributes: true,\n characterData: false,\n childList: false,\n subtree: true,\n attributeOldValue: true,\n characterDataOldValue: false\n });\n },\n getCart: function () {\n fetch(\"/cart.js\")\n .then((response) => response.json())\n .then((data) => {\n var cartProds = [],\n cartItems = data?.items,\n cartTotal = 0;\n cartItems?.map((i) => {\n if (i.product_id && i.price && i.quantity) {\n cartProds.push({\n ProductId: i?.product_id?.toString(),\n UnitPrice: +i.price / 100,\n Quantity: i?.quantity,\n });\n cartTotal = cartTotal + i?.price * i?.quantity;\n } else {\n _shq.log(\"Could not add product to array.\", \"error\", i);\n }\n });\n\n if (cartProds.length > 0) {\n _shq.push([\n \"onCartView\",\n {\n Items: cartProds,\n Total: +cartTotal / 100,\n },\n ]);\n } else {\n _shq.push([\"onCartEmpty\"]);\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 (bouncex.utils) bouncex.utils.segments = this;\n\n // initialize intercept and mirror, comment out if not needed\n this.useIntercept();\n this.useMirror();\n this.setCartWatcher();\n },\n};\n\nsegments.init();\n","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":false,"fme":false,"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":"404010353","ga4_measurement_id":"G-LHHDP0940L","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":"4d534e6b043e82ebaef3d95475c5526c","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"75060a85c1a4aebcc6f779b9e84db722","onsite":"abbdf7a49be9b52b097917b7b527b262","sms":"e39203556bab2366e56296ce42e974a7","websdk":"04cde0014774b7eb597770595769aab1"}; 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_945f37949f8f8ce4c4244cecb2df29ef.br.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); bouncex.initializeTag = function() {}; }; runtime.onload = bouncex.initializeTag; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();