(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":3888,"name":"Tamara Mellon","cookie_name":"bounceClientVisit3888","domain":"tamaramellon.com","ct":"bind_to_domain","ally":0,"ei":0,"tcjs":"","cjs":"","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-45030225-5","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":0},"burls":[],"ple":false,"fbe":true,"mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"var ALLOWED_DOMAINS = ['www.tamaramellon.com', 'shop.tamaramellon.com'],\n\tPDP_IMAGE_SELECTOR = 'img[class^=pdpimages-module--mainImage]:first',\n\tPDP_TITLE_SELECTOR = 'h1[class^=product-module--title]',\n\tSELECTED_COLOR = 'li:contains(\"Color\"):not(:contains(\"adjustments\"))',\n\tATC_BUTTON_IDENTIFIER = 'button[class*=addToCartBtn]',\n\tNOTIFY_ME_SELECTOR = 'input[value=\"Notify Me\"]',\n\tNO_SIZE_SELECTED = 'button[class*=sizeSelectBtn]:contains(\"Select Size\")',\n\tCATEGORY_REGEX = /\\bsandals|pumps|flats|sneakers|boots|bags|handbags|jewelry\\b/,\n\tINELIGIBLE_ITEM_IDENTIFIER = 'li:contains(\"Not eligible for discounts\")',\n\tCUSTOMER_EMAIL = 'window.tm.customerEmail',\n\tOOS_TAG = '.product-module--oos--2b4FX';\n\n/******** helper functions *********/\nfunction isValidDomain() {\n\treturn ALLOWED_DOMAINS.indexOf(window.location.hostname) > -1;\n}\n\nfunction isEnglish() {\n\treturn jQuery('html').attr('lang') === 'en';\n}\n\nfunction getPageUrl() {\n\tvar colorParam = getSelectedColor();\n\tvar baseUrl = bouncex.utils.url.allowParams();\n\tvar url = baseUrl + '?color=' + colorParam;\n\t\n\treturn encodeURI(url.toLowerCase());\n}\n\nfunction isGiftCard() {\n\treturn window.location.pathname.indexOf('gift-card') > -1;\n}\n\nfunction getSelectedColor() {\n\treturn jQuery(SELECTED_COLOR).text().replace(/Color –\\s+/g,'') || '';\n}\n\nfunction getItemId() {\n\tvar color = getSelectedColor();\n\tvar urlPath = window.location.pathname.replace(/products|[/]/g,'');\n\tvar id = color ? urlPath + '-' + color.replace(/\\s+/g,'-') : urlPath;\n\n\treturn id.toLowerCase();\n}\n\nfunction getItemImage() {\n\treturn jQuery(PDP_IMAGE_SELECTOR).attr('src') || '';\n}\n\nfunction getPageTitle() {\n\treturn jQuery(PDP_TITLE_SELECTOR).text().trim() || '';\n}\n\nfunction getItemCategory() {\n\tvar urlPath = window.location.pathname;\n\tvar categoryMatch = urlPath.match(CATEGORY_REGEX);\n\n\treturn categoryMatch && categoryMatch.length ? categoryMatch[0] : 'global';\n}\n\nfunction isInStock() {\n\treturn jQuery(OOS_TAG).length === 0;\n}\n\nfunction isDiscountEligible() {\n\treturn jQuery(INELIGIBLE_ITEM_IDENTIFIER).length === 0;\n}\n\n/******** start item trackig*********/\nfunction initiateItemTracking() {\n\tif(!isGiftCard() && bouncex.website.pts === 'product') {\n\t\tvar item;\n\n\t\tbouncex.et.onTrue(\n\t\t\tfunction(){\n\t\t\t\titem = buildItem();\n\t\t\t\treturn item.id && item.copy && item.imageurl;\n\t\t\t}, \n\t\t\tfunction(){\n\t\t\t\tfireItemEvents(item);\n\t\t\t}, \n\t\t50);\n\t}\n}\n\nfunction fireItemEvents(item) {\t\n\tif(bouncex.vars.last_viewed_shoe !== item.id) {\n\t\tif(!bouncex.state.mobile){\n\t\t\tbouncex.push(['item', item]);\n\t\t}\n\t\tbouncex.push(['view item', {\n\t\t\t'item:id': item.id\n\t\t}]);\n\n\t\ttrackAddToCart(item.id);\n\t\ttrackColorChange();\n\t\tbouncex.setv('last_viewed_shoe', item.id);\n\t}\n}\n\nfunction buildItem() {\n\treturn {\n\t\tid: getItemId(), \n\t\tcopy: getPageTitle(),\n\t\tcategory: getItemCategory(),\n\t\timageurl: getItemImage(),\n\t\turl: getPageUrl(),\n\t\tinstock: isInStock(),\n\t\tdiscountEligible : isDiscountEligible(),\n\t};\n}\n\nfunction trackColorChange() {\n\tbouncex.et.onVarChange('color_param', function(){\n\t\tinitiateItemTracking();\n\t});\n}\n\n/******** Track LoggedIn User *********/\nfunction trackLoggedInUser() {\n\tvar email;\n\n\tif(!bouncex.vars.logged_in_identified && window.location.pathname === '/account'){\n\t\temail = bouncex.utils.getNestedProp(CUSTOMER_EMAIL);\n\t\n\t\tif (bouncex.utils.validate.email(email)) {\n\t\t\tbouncex.push(['user', {\n\t\t\t\temail: email,\n\t\t\t\tsource: 'LoggedIn'\n\t\t\t}]);\n\t\t\tbouncex.setVarAndReload('logged_in_identified', true);\n\t\t}\n\t}\n}\n\n/*************** Empty Cart Tracking ***************/\nfunction trackEmptyCart() {\n\tif (bouncex.vars.cart_set && bouncex.vars.cart_qty === 0) {\n\t\tbouncex.push(['empty_cart', {}]);\n\t\tbouncex.setVarAndReload('cart_set', false);\n\t}\n}\n\n/******** track Add To Cart *********/\nfunction trackAddToCart(){\n\tvar itemId = getItemId();\n\n\tif(itemId){\n\t\tbouncex.off(jQuery(ATC_BUTTON_IDENTIFIER), 'click.bx');\n\t\tbouncex.on(jQuery(ATC_BUTTON_IDENTIFIER), 'click.bx', function(){\n\t\t\tif(!jQuery(NO_SIZE_SELECTED).length) {\n\t\t\t\tbouncex.push(['add to cart', {\n\t\t\t\t\t'item:id': itemId\n\t\t\t\t}]);\n\t\n\t\t\t\tif(!bouncex.vars.cart_set){\n\t\t\t\t\tbouncex.setVarAndReload('cart_set', true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t\n\t// ATC listener gets removed when a size that is out of stock is selected\n\t// listening for this and then listening for button to be visible again to reapply click listener \n\tbouncex.et.onVisible(NOTIFY_ME_SELECTOR, function(){\n\t\tbouncex.et.onVisible(ATC_BUTTON_IDENTIFIER, trackAddToCart);\n\t});\n}\n\n/*************** Cart Tracking ***************/\nfunction initCartTracking() {\n\tbouncex.et.cart.init({\n\t\treplenish: function(){},\n\t\treplenishmentType: 'single'\n\t});\n\tbouncex.et.onVarChange('cart_qty', trackEmptyCart);\n}\n\n/******** itiniate tracking code *********/\nif (isValidDomain() && isEnglish()) {\n\tinitCartTracking();\n\ttrackLoggedInUser();\n\tinitiateItemTracking();\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":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"collections"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkouts/"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === '/';"}]]},"product":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/products/"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search"}]]}},"els":{"CART - Checkout Button":"","CART - Promo Code Apply Button":"","CART - Promo Code Box":"","CAT - Product Grid Image":"","CAT - Quickview Box":"","CAT-AddtoCartButton":"","CAT-QuickviewAddtoCart":"","Footer":"","Navigation bar":"","PDP - Add to Cart Button":"","PDP - Color Option":"","PDP - Hero Image":"","PDP - Product Name":"","PDP - Product Price":"","PDP - Quantity Option":"","PDP - Review Stars":"","PDP - Size Option":"","PDP - Thumbnail Image":"","SEARCH - Product Grid Image":""},"vars":[{"name":"logged_in","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'cart' ? null : jQuery('#main-content a[href*=\"/account\"]:contains(My Account):visible, #main-nav a[href*=\"/account\"]:contains(My Account):visible').length > 0;","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 if (jQuery('[class*=cart-module--empty]').length > 0) {\n return 0;\n }\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 } else if (bouncex.website.pts === 'cart') {\n jQuery('input[class*=cart-module--quantity]').each(function() {\n count += Number(jQuery(this).val());\n });\n return count;\n }\n return Number(jQuery('[class*=header-module--count]').eq(0).text().replace(/[^0-9]/g, ''));\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function () {\n if (jQuery('[class*=cart-module--empty]').length > 0) {\n return 0;\n }\n if (bouncex.website.pts === 'cart') {\n return Number(jQuery('[class*=\"cart-module--subtotalContaine\"] p, .order-summary__emphasis')\n .first()\n .text()\n .replace(/[^0-9.]/g, '')\n );\n }\n if (jQuery('[class*=\"minicart-module--containerOpen\"]').length > 0) {\n var total = 0;\n jQuery('[class*=\"minicart-module--price\"]').each(function () {\n // regex to remove the slashed originaly price, then remove non number characters left over\n total += Number(jQuery(this).text().replace(/.*\\$/g, '').replace(/[^0-9.]/g, '')) || 0;\n });\n return total;\n }\n return null;\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product' ? jQuery('.sale-price').length > 0 ? jQuery('.sale-price').text().replace(/[^0-9.]/g, '') : jQuery('.display-price').text().replace(/[^0-9.]/g, '') : null;","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product' ? jQuery('.product-silhouette').text() + \" \" + jQuery('.product-heelheight').text() : null;","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product' ? jQuery('#pdp-page #add-to-cart-btn:visible').length > 0 : null;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('#newsletter-signup .success_message:visible').length > 0 || null;","trigger":""},{"name":"last_viewed_shoe","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"","trigger":""},{"name":"cart","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"","trigger":"pageload"},{"name":"cart_set","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":["category","search"],"testmode":false,"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":"color_param","polling":"vars","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"bouncex.utils.url.getParam('color') || bouncex.utils.url.getParam('Color');","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":"","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 Tamara Mellon mktg txts (like cart reminders) to this #, per terms.\n","eventSharing":false,"shqId":"","enabled":1},"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":"290369706","ga4_measurement_id":"G-W2Q9S3KYVY"} ; 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":"52a0ebae6fb54b5b94e4dc6e038f90ff","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_8d03e4c35771169b7c951faff9475370.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(); }})();