(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":4423,"name":"Diane Von Furstenberg - Europe","cookie_name":"bounceClientVisit4423","domain":"europe.dvf.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-235260-17","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":"// BK: Last update made on 1-18-24. \n// Use 4401 as the master for any changes, then copy that template to 4401, 4423, 4424.\n\nvar configObj = {\n '4401': {\n websiteUrl: \"www.dvf.com/\",\n trackCatalogue: true\n },\n '4423': {\n websiteUrl: \"europe.dvf.com/\",\n trackCatalogue: true\n },\n '4424': {\n websiteUrl: \"uk.dvf.com/\",\n }\n},\n config = configObj[bouncex.website.id],\n COOKIE_NAME = \"cart\";\n/************************** HELPERS ***************************/\nfunction getUrl() {\n return bouncex.utils.url.allowParams();\n}\n\nfunction isValidForTracking() {\n var url = getUrl();\n\n return url.indexOf(config.websiteUrl) > -1\n && jQuery(\"html\").attr(\"lang\").indexOf(\"en\") > -1;\n}\n\nfunction getProdIdFromUrl(url) {\n url = url.split(\"/products/\")[1],\n idCheck = /[0-9A-Za-z\\-]*/g,\n match = url.match(idCheck);\n\n return match ? match[0] : \"\";\n}\n\nfunction getMetaPageTitle() {\n return jQuery('meta[property=\"og:title\"]').attr('content') || \"\";\n}\n\nfunction availabilityJson() {\n return jQuery(\"script[type='application/ld+json']:contains(availability):not(.y-rich-snippet-script)\");\n}\n\nfunction getMobileAvailability() {\n return jQuery('.nosto_product .availability').text().toLowerCase().indexOf(\"instock\") > -1;\n}\n\nfunction getItemImageUrl() {\n var imgUrl = jQuery('.nosto_product > .image_url').first().text();\n if (imgUrl && imgUrl.indexOf(document.location.hostname) === -1) {\n imgUrl = window.location.origin + imgUrl;\n }\n return imgUrl && imgUrl.indexOf('https:') === -1 ? 'https:' + imgUrl : imgUrl;\n}\n\n/************************** ITEM ***************************/\nfunction getItem() {\n var pdpUrl = jQuery('meta[property=\"og:url\"]').attr('content') || getUrl();\n return {\n id: getProdIdFromUrl(pdpUrl),\n copy: getMetaPageTitle(),\n category: bouncex.utils.getNestedProp('ShopifyAnalytics.meta.product.type') || \"global\",\n url: pdpUrl,\n imageurl: getItemImageUrl(),\n instock: availabilityJson().text().indexOf(\"InStock\") > -1 || getMobileAvailability(),\n };\n}\n\nfunction initCatalogueListener(itemId, groupId) {\n var lastFiredSku;\n bouncex.et.on(jQuery(\".SizeSwatch\"), 'click.bx', function () {\n // we are setting a short timeout because the variant changes right after the click.\n bouncex.setTimeout2(function() {\n var sku = bouncex.utils.url.getParam(\"variant\") || \"\";\n if (sku && sku !== lastFiredSku) {\n bouncex.push([\n 'select_sku',\n {\n 'item:id': itemId,\n 'item:itemgroupid': groupId,\n 'item:feedid': sku\n }\n ]);\n lastFiredSku = sku;\n }\n }, 500);\n });\n}\n/************************* CATEGORY **************************/\nfunction getCategoryIds() {\n return jQuery(\"#main a\").map(function () {\n var url = jQuery(this).attr(\"href\") || \"\",\n prodId = getProdIdFromUrl(url);\n if (prodId) return prodId;\n }).toArray().join(\",\");\n}\n/*************************** CART ****************************/\nfunction replenish(cart) {\n bouncex.utils.cookies.create({ name: COOKIE_NAME, value: cart.token });\n window.location.href = window.location.pathname + \"?bx_replen=true\";\n}\n\nfunction emptyCart() {\n bouncex.et.onVarChange(\"cart_qty\", function () {\n if (bouncex.vars.cart_qty === 0 && bouncex.vars.cart_set) {\n bouncex.push([\"empty_cart\", {}]);\n bouncex.setv(\"cart_set\", false);\n setBounceCookie();\n }\n });\n}\n\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n replenishmentType: 'cookie',\n replenish: replenish,\n });\n emptyCart();\n}\n\nfunction addItemToCart(itemId) {\n var cookie;\n bouncex.et.onTrue(function () {\n cookie = bouncex.getBounceCookie(COOKIE_NAME);\n return cookie;\n }, function () {\n bouncex.push([\n \"add to cart\",\n { \"item:id\": itemId, \"cart:token\": cookie }\n ]);\n if (!bouncex.vars.cart_set) {\n bouncex.setv(\"cart_set\", true);\n }\n setBounceCookie();\n }, 5);\n}\n\nfunction initializeQuickAddToCart(){\n bouncex.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/********************** USER TRACKING ***********************/\nfunction initializeLoggedInUser() {\n if (bouncex.vars.logged_in\n && !bouncex.vars.logged_in_identified\n && bouncex.vars.email_input\n && bouncex.utils.validate.email(bouncex.vars.email_input)) {\n\n bouncex.push([\n \"user\",\n {\n email: bouncex.vars.email_input,\n source: \"LoggedIn\"\n }\n ]);\n bouncex.setv(\"logged_in_identified\", true);\n setBounceCookie();\n }\n}\n\nfunction listenForLogin() {\n bouncex.et.on(jQuery(\"form[action='/account/login'],#create_customer\"), \"submit.bx\", function () {\n bouncex.setv(\"email_input\", jQuery(\"input[name='customer[email]']\").val());\n });\n}\n\n/******************* INITIALIZE EVENTS *********************/\nfunction initializeEvents() {\n if (bouncex.website.pts === \"product\") {\n var item,\n groupId;\n bouncex.et.onTrue(function () {\n item = getItem();\n groupId = jQuery(\".product_id\").first().text();\n return item.id && item.imageurl && item.category && item.copy && (availabilityJson().length || jQuery('.nosto_product .availability').length) && groupId;\n }, function () {\n var viewItemObj = { \"item:id\": item.id };\n\n if (config.trackCatalogue) {\n viewItemObj['item:itemgroupid'] = groupId;\n initCatalogueListener(item.id, groupId);\n }\n\n bouncex.push([\"view item\", viewItemObj]);\n bouncex.log(item);\n bouncex.push([\"item\", item]);\n\n bouncex.et.on(jQuery(\".ProductForm__AddToCart[data-action='add-to-cart']\"), 'click.bx', function () {\n addItemToCart(item.id);\n });\n }, 15);\n }\n\n if (bouncex.website.pts === \"category\") {\n var ids;\n bouncex.et.onTrue(function () {\n ids = getCategoryIds();\n return ids.length;\n }, function () {\n bouncex.push([\"view category\", {\n \"page:title\": getMetaPageTitle(),\n \"page:url\": getUrl(),\n \"items:ids\": ids\n }]);\n }, 15);\n }\n\n if (window.location.href.indexOf(\"/login\") > -1 || window.location.href.indexOf(\"/register\") > -1) {\n listenForLogin();\n }\n}\n\nif (isValidForTracking()) {\n initializeQuickAddToCart();\n initializeEvents();\n initializeCartEvents();\n initializeLoggedInUser();\n}","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"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';"}]]},"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":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('meta.page.pageType') === 'searchresults';"}]]}},"els":{"add_to_cart_cta":".ProductForm__AddToCart.Button--primary","blank_site_element":""},"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,''));\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(/\\./g, '').replace(',', '.').replace(/[^0-9.]/g, ''));\n }\n return Number(jQuery('[data-flow-localize=\"cart-subtotal\"]').text().replace(/\\./g, '').replace(',', '.').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(/\\./g, '').replace(',', '.').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":"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":"email_input","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"","code":"null;","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":"\".giftcard input\"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":0,"spatm":1,"preinit_cjs":"var 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":"Send this text to sign-up for automated, recurring Diane Von Furstenberg - Europe marketing texts, like cart reminders.","eventSharing":true,"shqId":"y4wiwnsi79-1","enabled":1},"pde":true,"fme":false,"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":"367282260","ga4_measurement_id":"G-YNZ8EEJE3Q","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":"07d5b82cf97935025a59bf55f6552b1c","creativesBaseStyles":"a53944a2","gpsAuction":"0aafcb326e2e52aae2936349578031e7","inbox":"02aca5df0e176b8810a86da97ac05424","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"437a9f1c542faaacb49577b266dc4d73"}; 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_efcf4183cfe60de21aa43976b713ebd6.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(); }})();