(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":4371,"name":"Boux Avenue UK","cookie_name":"bounceClientVisit4371","domain":"bouxavenue.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/* enable.feature.COMPLIANCE_REFACTOR_ENABLED */","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-19175337-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":1},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"var COOKIE = 'dwanonymous_c8825af3a14f7c70294dfa3f61f27f4a';\n\n// ---- HELPERS ---- //\n\nfunction getUrl() {\n\treturn bouncex.utils.url.allowParams();\n}\n\nfunction isValidDomain(){\n\treturn getUrl().indexOf('www.bouxavenue.com') > -1; \n}\n\nfunction isEnGb(){\n\treturn jQuery('html').attr('lang') === 'en' && jQuery('.js-shippingSwitcherLink img').hasClass('flag-gb');\n}\n\nfunction setVarAndCookie(varName, value) {\n bouncex.setVar(varName, value);\n bouncex.setBounceCookie();\n return;\n}\n\nfunction isValidForTracking(){\n return getUrl().indexOf('/boux-gift-card') === -1;\n}\n\nfunction isMatchingSet(){\n var url = getUrl();\n return url.indexOf('matching-sets/') > -1 || url.indexOf('bikini-set/') > -1;\n}\n\nfunction stripId(itemId){\n return itemId.split('_').shift();\n}\n\nfunction trackNotifyMePDP(id) {\n bouncex.et.onVisible('.content-asset:contains(\"all set\")', function(){\n bouncex.push(['notifyme', {\n 'item:id': id\n }]);\n });\n}\n\n// ---- ITEM META DATA ---- //\n\nfunction getItemUrl(){\n var url = jQuery('link[rel=\"canonical\"]').attr('href') || getUrl(),\n baseUrl = stripId(url);\n \n return baseUrl.indexOf('.html') > -1 ? baseUrl : baseUrl + '.html';\n}\n\nfunction getItem() {\n var productData = bouncex.utils.getNestedProp('dcProductData', {id: \"\"}),\n $productImage = jQuery('.js-product-images_main_pdp:first');\n\treturn {\n\t\tid : stripId(productData.id) || stripId(jQuery('html').attr('id') || ''),\n\t\tcopy: productData.name || $productImage.attr('title') || '',\n\t\tcategory : productData.category || jQuery('.b-breadcrumbs-item:first').text(),\n\t\turl : getItemUrl(),\n\t\timageurl : productData.imgURL || $productImage.attr('href'),\n\t\tinstock : jQuery('#add-to-cart').text().toLowerCase() === \"add to bag\"\n\t};\n}\n\nfunction viewItem(itemId){\t\n bouncex.push(['view item', {\n 'item:id': itemId,\n 'item:itemgroupid': itemId\n }]);\n \n}\n\nfunction fireMatchingSetEvents(){\n jQuery('span[itemprop=\"productID\"]').each(function(){\n var itemId = jQuery(this).attr('data-masterid') || jQuery(this).text().trim();\n \n if (itemId){\n viewItem(stripId(itemId));\n }\n });\n}\n\nfunction trackLingerieProduct(item) {\n if (item.category === 'Lingerie') {\n bouncex.push(['view_lingerie', {'item:id': item.id}])\n }\n}\n\n// ---- QUICKVIEW ---- //\n\nfunction getQuickviewId(){\n // var itemUrl = jQuery('.b-product_tile-bvinlineproductlink').attr('href') || '',\n // itemId = itemUrl.split('/').pop().split('.').shift();\n \n return jQuery('#QuickViewDialog [name=\"pid\"]').val()\n}\n\nfunction loadQuickviewEvents(){\n bouncex.et.onVisible('.quickview-nav.b-quickview-nav', function(){\n if(bouncex.testmode.bxdev){\n debugger;\n }\n var itemId = getQuickviewId();\n \n if (itemId){\n viewItem(itemId);\n trackSku();\n }\n });\n}\n\nfunction qvOpen(){\n return jQuery('.quickview-nav.b-quickview-nav:visible').length;\n}\n\n// ---- Catalog ---- //\n\nfunction getSku(){\n \n var newSku = jQuery('[name=\"pid\"]').val() || false;\n var prodData = jQuery('.js-product-images_container').eq(0).attr('data-dc-item');\n \n if (qvOpen()){\n prodData = jQuery('#QuickViewDialog .product-detail .js-product-images_container').eq(0).attr('data-dc-item');\n } \n \n return newSku || bouncex.parseJSON(prodData).id || '';\n}\n\nfunction trackSku(itemId){\n bouncex.et.on(jQuery(document), 'click.bx', function(){\n var sku;\n \n if (qvOpen()){ \n itemId = getQuickviewId();\n }\n \n bouncex.et.onTrue(function(){\n return jQuery('.b-loader').attr('style') === \"display: none;\";\n }, function(){\n sku = getSku();\n \n if (sku !== bouncex.vars.prev_sku.toString()\n && sku.indexOf('_') > -1){\n fireSelectSku(itemId, sku);\n }\n }, 30);\n }, '.b-product_variations .swatches a');\n \n if (jQuery('.js-product-swatch_select').length){\n bouncex.et.on(jQuery(document), 'change', function(e){\n var parent = jQuery(e.target).parents('.js-product-set-item'),\n parentId = parent.attr('id'),\n sku;\n \n itemId = parentId.replace('item-', '').split('_').shift();\n \n bouncex.et.onTrue(function(){\n sku = parent.find('span[itemprop=\"productID\"]').text();\n return sku !== bouncex.vars.prev_sku.toString()\n && sku !== parentId.replace('item-', '')\n && sku.indexOf('_') > -1;\n }, function(){\n fireSelectSku(itemId, sku);\n }, 10);\n \n }, '.js-product-swatch_select');\n \n }\n \n}\n\nbouncex.log('sku')\n\nfunction fireSelectSku(itemId, sku){\n bouncex.push(['select_sku', {\n 'item:id': itemId,\n 'item:itemgroupid': itemId,\n 'item:feedid': sku\n }]);\n \n bouncex.setv('prev_sku', sku);\n}\n\n// ---- CATEGORY META DATA ---- //\n\nfunction filterIds(idArray) {\n return idArray.filter(function (value, index, self) { \n return self.indexOf(value) === index;\n });\n}\n\nfunction getCategoryIds(){\n var itemIds = jQuery('.js-product-images_container').map(function(){\n var itemId = jQuery(this).attr('data-itemid');\n\n if (itemId){\n return stripId(itemId);\n }\n }).toArray();\n\n return filterIds(itemIds).join(',');\n}\n\nfunction getCategoryObj(){\n\treturn {\n 'page:title' : jQuery('.b-plps-title').text(),\n 'page:url': bouncex.utils.url.allowParams('q'),\n 'items:ids': getCategoryIds()\n };\n}\n\n// ---- CART TRACKING ---- //\n\nfunction addToCart(event, xhr, settings){\n if (settings.url.indexOf('/Cart-AddProduct') > -1 && settings.type === \"POST\"){\n var itemId = bouncex.utils.getParam('pid', settings.data);\n\n if (itemId) {\n bouncex.push(['add to cart',{\n 'item:id': stripId(itemId),\n 'cart:token': bouncex.getBounceCookie(COOKIE)\n }]);\n }\n setVarAndCookie('cart_set', true);\n }\n}\n\nfunction replenish(cart){\n bouncex.utils.cookies.create({'name': COOKIE, 'value': cart.token});\n window.location.href = window.location.pathname + '?bx_replen=true';\n}\n\nfunction emptyCart(){\n if (bouncex.vars.cart_set && bouncex.vars.cart_qty === 0){\n bouncex.push(['empty_cart']);\n setVarAndCookie('cart_set', false);\n }\n}\n\n// ---- INITIALIZE EVENTS ---- //\nfunction initializeItemEvents(){\n var item; \n\n if (isMatchingSet()){\n fireMatchingSetEvents();\n trackSku();\n return;\n }\n \n\tbouncex.et.onTrue(function(){ \n \t item = getItem(); \n \t return item.id; \n \t}, function(){ \n \t bouncex.push(['item', item]); \n \t viewItem(item.id); \n \t trackSku(item.id);\n trackLingerieProduct(item);\n \t bouncex.setv('prev_sku', getSku());\n \t trackNotifyMePDP(item.id);\n }, 12);\n}\n\nfunction initializeCategoryEvents(){\n\tvar categoryObj; \n\t\n\tbouncex.et.onTrue(function(){\n\t\tcategoryObj = getCategoryObj();\n\t\treturn categoryObj['items:ids'].length > 0; \n\t}, function(){\n\t\tbouncex.push(['view category', categoryObj]);\n\t}, 10);\n}\n\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n replenishmentType : 'cookie',\n replenish : replenish,\n });\n \n bouncex.et.on(jQuery(document), 'ajaxComplete', addToCart);\n bouncex.et.onVarChange('cart_qty', emptyCart);\n}\n\nfunction initializeLoggedInUser(){\n if (bouncex.vars.logged_in && bouncex.vars.logged_in_identified === false){\n var userEmail = bouncex.utils.getNestedProp('customerData.plainTextEmail');\n \n if (bouncex.utils.validate.email(userEmail)){\n bouncex.push([\n 'user',\n {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }\n ]);\n \n bouncex.setv('logged_in_identified', true);\n setBounceCookie();\n }\n }\n}\n\n\n\nfunction init(){\n if (isValidDomain() && isEnGb()) {\n initializeLoggedInUser();\n initializeCartEvents();\n loadQuickviewEvents();\n\n if (!isValidForTracking()){ return; }\n \n switch (bouncex.website.pts) {\n case 'product':\n initializeItemEvents();\n break;\n case 'category':\n case 'search':\n initializeCategoryEvents();\n break;\n default:\n break;\n }\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":"/your-bag"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('.search-result-content').length > 0;"}],[{"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":"/checkout"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"Checkout"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.pt_checkout').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/order-confirmed"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('[rel=\"canonical\"][href=\"https://www.bouxavenue.com/\"]').length > 0;"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.p-pdp').length > 0;"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search?q"}]]}},"els":{"blank_site_element":""},"vars":[{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.m-logged').length > 0 || bouncex.utils.getNestedProp('customerData.loggedIn');","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":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n\tif (bouncex.website.pts === 'checkout') {\n\t\treturn null;\n\t}\n\n\treturn Number(jQuery('.qtyValue, .minicart-quantity').text().replace(/[^0-9.]/g, ''));\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n\tif (bouncex.website.pts === 'checkout') {\n\t\treturn null;\n\t}\n\n\treturn Number(jQuery('.minitotals-col-price, .mini-cart-subtotals, .order-subtotal').first().text().replace(/[^0-9.]/g, ''));\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.b-product_bottom_price .price-sales').text().replace(/[^0-9.]/g, '');","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.product-name').text().trim();","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('#add-to-cart:enabled').length > 0;","trigger":""},{"name":"submitted_onsite","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('registration?footer=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":false,"default":"false","code":"jQuery('.optanon-alert-box-wrapper:visible').length > 0;","trigger":"pageload"},{"name":"modal_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.optanon-alert-box-wrapper:visible').length > 0 && jQuery('#globalePopupWrapper:visible, .ui-widget-overlay:visible, .dy-modal-wrapper:visible, .fm-lightbox-wrapper:visible').length > 0;","trigger":"pageload"},{"name":"logged_in_identified","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":"prev_sku","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"on_pdp","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product';","trigger":"pageload"},{"name":"on_sale","polling":"vars","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.js-pdp-top_info .b-product_price-previous, .js-pdp-top_info .b-promo_message:contains(\"for\")').length > 0;","trigger":"pageload"},{"name":"dynamicyield_popup_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.ab-exit-popup.mod-show').length > 0;","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":0,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"bxid":"espemailid"},"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":0,"spatm":1,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"Hit 'Send' to sign-up for automated, recurring Boux Avenue mktg txts (like cart reminders) to this #, per terms.","eventSharing":false,"shqId":"","enabled":1},"pde":true,"fmc":["GB"],"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":"266582471","ga4_measurement_id":"G-DFERWSK3Z1","tag_state_domain":"api.bounceexchange.com"} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 1 }; bouncex.assets = {"ads":"005ab6b05ecd8ae76686b26c919990d4","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"75060a85c1a4aebcc6f779b9e84db722","onsite":"abbdf7a49be9b52b097917b7b527b262","sms":"e39203556bab2366e56296ce42e974a7","websdk":"3cdb3cd0b71927a211b8afdc85918cfd"}; 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_f19dec562548dbdce62699a91533f8b0.br.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/cjs_min_3a843477d8e318f67237a66d0a58c542.js'); deviceGraphScript.setAttribute('async', 'async'); var dgAttrs = [{"Key":"id","Value":"c.js"},{"Key":"async","Value":"true"},{"Key":"data-apikey","Value":"2^HIykD"},{"Key":"data-cb","Value":"bouncex.dg.initPostDeviceGraph"},{"Key":"data-bx","Value":"1"},{"Key":"data-gm","Value":"1"},{"Key":"data-fire","Value":"1"}]; if (dgAttrs) { for (var i = 0; i < dgAttrs.length; i++) { deviceGraphScript.setAttribute(dgAttrs[i].Key, dgAttrs[i].Value); } } document.body.appendChild(deviceGraphScript); bouncex.initializeTag = function() {}; }; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();