(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":3623,"name":"Cle de Peau Beaute","cookie_name":"bounceClientVisit3623","domain":"cledepeaubeaute.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/** DR: Override report ga function for custom send event **/\nwindow.bouncex.report_ga = function(action, label, bypass) {\n\tbypass = typeof(bypass)!='undefined' && !!bypass;\n\tif(typeof(action)!='string'||typeof(label)!='string') return;\n\tvar interaction = false;\n\t// enforce case convention\n\tif(!bypass) {\n\t\taction = action.charAt(0).toUpperCase() + action.slice(1).toLowerCase();\n\t\tinteraction = action=='Impression';\n\t\taction = 'BounceX ' + action;\n\t}\n\tif(typeof window.ga === 'function') {\n\t\tif(bouncex.website.gai){\n\t\t\twindow.ga('create', bouncex.website.gai);\n\t\t}\n\t\twindow.ga('_gaclientName.send','event','BounceX',action,label,{'nonInteraction':interaction});\n\t} else if(typeof window._gaq === 'object') {\n\t\tif(bouncex.website.gai){\n\t\t\twindow._gaq.push(['_setAccount', bouncex.website.gai]);\n\t\t}\n\t\tvar strippedLabel = label.replace(/\\(|\\)/g, ''); // window._gaq encodes close paren as '1\n\t\twindow._gaq.push(['_trackEvent','BounceX',action,strippedLabel,,interaction]);\n\t}\n};","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-53372215-1","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":0,"gmp":0,"whitelist_check":1},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":5,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* eslint sort-vars: 0 */\nvar ALLOWED_DOMAINS = ['www.cledepeaubeaute.com'],\n ATC_BTN_SELECTOR,\n quickViewItemId;\n\nfunction isValidDomain() {\n\treturn ALLOWED_DOMAINS.indexOf(window.location.hostname) > -1;\n}\n\nfunction getItemId(pathName){\n\tif(typeof(pathName) === 'string' && pathName.length > 0){\n\t\tvar path = pathName.split('.html')[0].split('/');\n\t\treturn path[path.length -1];\n\t}\n\treturn false;\n}\n\nfunction getItemName(){\n\tif(bouncex.website.pts === 'product'){\n\t\treturn bouncex.vars.prod_name;\n\t}\n}\n\nfunction getItemCategory(){\n\treturn bouncex.utils.getNestedProp('universal_variable.product.category') || 'other';\n}\n\nfunction getItemImage(){\n\treturn encodeURI(jQuery('meta[property=\"og:image\"]').attr('content')) || false;\n}\n\nfunction getPageUrl(){\n\treturn bouncex.utils.url.allowParams();\n}\n\nfunction buildItem() {\n\tvar item = {\n\t\t\tid: getItemId(window.location.pathname),\n\t\t\tcopy: getItemName(),\n\t\t\tcategory: getItemCategory(),\n\t\t\timageurl: getItemImage(),\n\t\t\turl: getPageUrl(),\n\t\t\tinstock: bouncex.vars.in_stock,\n\t\t\tclient_product_id: jQuery('#pdpMain').attr('data-pid') || ''\n\t\t},\n\t\tnewItem = {},\n\t\tx;\n\t\n\tif (!item.id) {\n\t\treturn false;\n\t}\n\tfor (x in item) {\n\t\tif (item.hasOwnProperty(x)) {\n\t\t\tnewItem['item:' + x] = item[x];\n\t\t\tdelete item[x];\n\t\t}\n\t}\n\t\n\treturn newItem;\n}\n\nfunction pushSkuEvents(){\n \t\t\n\tbouncex.et.onVarChange('item_sku', function (oldVal, newVal) {\n\n\t //if oldval is false and there is swatches do not fire yet\n \tif(oldVal === false && jQuery('#pdp-swatches').length > 0){\n \t return;\n \t}\n\t \n\t //if oldVal is false and there are no swatches fire\n\t if((oldVal === false && jQuery('#pdp-swatches').length === 0) && newVal !== \"\" && newVal !== false){\n\t bouncex.push([\n 'select_sku',\n {\n 'item:id': getItemId(window.location.pathname),\n 'item:itemgroupid': window.productCache && window.productCache[0] && window.productCache[0].ID || jQuery('[itemprop=\"productID\"]').attr('data-masterid'),\n 'item:feedid': jQuery('[name=\"productID\"]').first().attr('value') || jQuery('[itemprop=\"productID\"]').attr('data-pid')\n }\n ]);\n\t \n\t } else if (newVal !== \"\" && newVal !== false) {\n bouncex.push([\n 'select_sku',\n {\n 'item:id': getItemId(window.location.pathname),\n 'item:itemgroupid': window.productCache && window.productCache[0] && window.productCache[0].ID || jQuery('[itemprop=\"productID\"]').attr('data-masterid'),\n 'item:feedid': jQuery('[name=\"productID\"]').first().attr('value') || jQuery('[itemprop=\"productID\"]').attr('data-pid')\n }\n ]);\n }\n\n });\n //jQuery('[name=\"productID\"]').first().attr('value')\n //productCache[0].ID -- group\n}\n\nfunction trackItem(){\n\tvar item = buildItem();\n\n\tif (item !== false) {\n\t\tbouncex.push(['item', item]);\n\t\t\n\t\tbouncex.push(['view item', {\n\t\t\t'item:id': item['item:id'],\n\t\t\t'item:itemgroupid': window.productCache && window.productCache[0] && window.productCache[0].ID || jQuery('[itemprop=\"productID\"]').attr('data-masterid')\n\t\t}]);\n\t\t\n pushSkuEvents();\n\t}\n}\n\nfunction trackQuickviewItem(){ \n\tquickViewItemId = getItemId(this.href);\n \n\tif(quickViewItemId !== false){\n\t\tbouncex.push(['view item', {\n\t\t\t'item:id': quickViewItemId\n\t\t}]);\n\t}\n}\n\nfunction trackQuickview(){\n\tbouncex.on(jQuery(document), 'click.bx', trackQuickviewItem, 'a#quickviewbutton.quickview');\n}\n\nfunction getItemsIds(){\n\tvar idList = jQuery('#search-result-items div') ? jQuery('#search-result-items div.product-name') : false;\n\t\n\tif(idList !== false && idList.length > 0){\n\t\treturn idList.map(function(){\n\t\t\treturn getItemId(jQuery(this).parent().attr('href'));\n\t\t}).toArray().join();\n\t}\n\n\treturn false;\n}\n\nfunction getCategoryTitle(){\n\treturn jQuery('.breadcrumb-element').last().text().trim() || false;\n}\n\nfunction trackCategory(){\n\tvar itemsIds = getItemsIds();\n\n\tif (!itemsIds || !itemsIds.length){\n\t\treturn;\n\t}\n\n\tbouncex.push(['view category', {\n\t\t'items:ids': itemsIds,\n\t\t'page:title': getCategoryTitle(),\n\t\t'page:url': getPageUrl()\n\t}]);\n}\n\nfunction fireATC(){\n\tvar itemId = false;\n\n\tif(bouncex.website.pts === 'product'){\n\t\titemId = getItemId(window.location.pathname);\n\t} else {\n\t\titemId = getItemId(jQuery(this).parents('.product-tile').find('.name-link').attr('href')) || quickViewItemId;\n\t}\n\n\tif(itemId && itemId.length > 0){\n\t\tbouncex.push(['add to cart', {\n\t\t\t'item:id': itemId\n\t\t}]);\n\t\tbouncex.setv('cart_set', true);\n\t\tsetBounceCookie();\n\t}\n}\n\nfunction trackCart(){\n\tif(jQuery('#add-to-cart').length > 0){\n\t\tATC_BTN_SELECTOR = '#add-to-cart';\n\t}\n\n\tif(jQuery('#add-all-to-cart').length > 0){\n\t\tATC_BTN_SELECTOR = '#add-all-to-cart';\n\t}\n\n\tbouncex.off(jQuery(document), 'click.bx', ATC_BTN_SELECTOR);\n bouncex.on(jQuery(document), 'click.bx', fireATC, ATC_BTN_SELECTOR);\n}\n\n\nfunction trackCategoryATC(){\n bouncex.off(jQuery(document), 'click.bx', '.add-to-cart-button');\n bouncex.on(jQuery(document), 'click.bx', fireATC, '.add-to-cart-button');\n}\n\nfunction emptyCartPush() {\n\tif(bouncex.vars.cart_set === true){\n\t\tbouncex.push(['empty_cart', {}]);\n\t\tbouncex.setv('cart_set', false);\n\t\tsetBounceCookie();\n\t}\n}\n\nfunction trackEmptyCart() {\n\tbouncex.et.onVisible('.cart-empty', emptyCartPush);\n}\n\nfunction getEmail () {\n\treturn !!window.universal_variable &&\n\t\t!!window.universal_variable.user &&\n\t\twindow.universal_variable.user.email;\n}\n\nfunction trackLoggedInUser() {\n\tvar email;\n\n\tif (!bouncex.vars.logged_in || bouncex.vars.logged_in_identified) {\n\t\treturn;\n\t} \n\n\temail = getEmail();\n\n\tif (email) {\n\t\tbouncex.push(['user', {\n\t\t\temail: email,\n\t\t\tsource: 'LoggedIn',\n }]);\n bouncex.setv('logged_in_identified', true);\n setBounceCookie();\n }\n}\n\nif (isValidDomain()) {\n\ttrackLoggedInUser();\n\tbouncex.et.cart.init({\n\t\treplenish: function () { },\n\t\treplenishmentType: 'single'\n\t});\n\n\tswitch (bouncex.website.pts) {\n\t\tcase 'product':\n\t\t\ttrackItem();\n\t\t\t/* getSubItems(); */\n\t\t\ttrackCart();\n\t\t\tbreak;\n\t\tcase 'category':\n\t\t\ttrackCategory();\n\t\t\ttrackCategoryATC();\n\t\tcase 'search':\t\n\t\t\ttrackQuickview();\n\t\t\ttrackCategoryATC();\n\t\t\t/* getSubItems(); */\n\t\t\tbouncex.et.onVisible('#add-to-cart, #add-all-to-cart', trackCart);\n\t\t\tbreak;\n\t\tcase 'cart':\n\t\t\ttrackEmptyCart();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n}","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/cart/"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('pageCategory') === 'Product List Page';"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout/"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('window.dataLayer[0].pageCategory') === 'Home Page';"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('window.dataLayer[0].pageCategory') === 'Product Page'|| !!document.querySelector('.pt_product-details');"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search/?q="}]]}},"els":{"CART - Checkout Button":"button[value=Checkout]","CART - Promo Code Apply Button":"button#add-coupon","CART - Promo Code Box":"input[id*=couponCode]","CAT - Product Grid Image":".product-image","CAT - Quickview Box":"","CAT-AddtoCartButton":"","CAT-QuickviewAddtoCart":"","Footer":"footer","Navigation bar":"#minimized-header-container","PDP - Add to Cart Button":"#add-to-cart","PDP - Color Option":"#va-color","PDP - Hero Image":".primary-image","PDP - Product Name":"h1.product-name","PDP - Product Price":"span.product-price","PDP - Quantity Option":"div.quantity","PDP - Review Stars":".bv-stars-container","PDP - Size Option":"#pdp-swatches.size","PDP - Thumbnail Image":".product-image-thumbnail","SEARCH - Product Grid Image":".product-image"},"vars":[{"name":"logged_in","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.User && window.User.isRegistered;","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":"(function(){\n var cart = bouncex.utils.getNestedProp('universal_variable.basket.line_items');\n\t\tif (cart && cart.length >= 0){\n\t\t\treturn cart.reduce(function(acc, curr){\n\t\t\t\treturn acc += curr.quantity;\n\t\t\t}, 0);\n\t\t}\n\t\treturn null;\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"bouncex.utils.getNestedProp('universal_variable.basket.total');","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('universal_variable.product.unit_sale_price');","trigger":""},{"name":"prod_name","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('universal_variable.product.name') || jQuery('h1.product-name').text();","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('#add-to-cart[data-instock=\"IN_STOCK\"], #add-all-to-cart:not(:disabled)').length > 0;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.register-success, [class*=\"signup_wrapper\"] + [class*=\"thankyou_wrapper\"],[class*=\"signup_wrapper\"] [class*=\"thank-you-bottom\"]').is(':visible') || null;","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":"no","page_types":[],"testmode":true,"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":"cart","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"product_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product';","trigger":"pageload"},{"name":"v_code","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.url.getParam('v_code') || false;","trigger":"pageload"},{"name":"item_sku","polling":"vars","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('[name=\"productID\"]').first().attr('value') || jQuery('[itemprop=\"productID\"]').attr('data-pid')","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":{"et_rid":"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":"","eventSharing":false,"shqId":"","enabled":0},"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":"280778124","ga4_measurement_id":"G-XRBF4XTHLL","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_756cfb1d158076d67943a971b41e5c68.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(); }})();