(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":4391,"name":"LAGOS","cookie_name":"bounceClientVisit4391","domain":"lagos.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-22459036-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":0},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/** *********** GLOBAL VARIABLES **************/\n\nvar DOMAIN = 'www.lagos.com',\n CART_COOKIE = 'cart';\n\n/** *********** HELPERS **************/\n\nfunction getUrl() {\n return bouncex.utils.url.allowParams();\n}\n\nfunction isValidDomain() {\n var currentUrl = getUrl();\n return currentUrl.indexOf(DOMAIN) > -1;\n}\n\nfunction isEn() {\n return jQuery('html').attr('lang') === 'en';\n}\n\n/** *********** USER TRACKING **************/\n\nfunction getUserEmail() {\n var url = getUrl();\n\n if (url.indexOf('/account') > -1) {\n return jQuery('input[name=\"email\"]').eq(1).attr('value') || '';\n }\n}\n\n/** *********** CATEGORY TRACKING **************/\n\nfunction getCategoryTitle() {\n return jQuery('#currentCollectionBreadcrumb').text().toLowerCase().replaceAll(' ', '-') || '';\n}\n\nfunction getCategoryIds() {\n var $catItems = jQuery('.grid-view-item__link') || '',\n itemIds = [],\n itemUrl;\n\n if ($catItems.length) {\n for (var i = 0; i < $catItems.length; i++) {\n itemUrl = jQuery($catItems[i]).attr('href');\n itemUrl = itemUrl.split('products/')[1].split('?')[0];\n itemIds.push(itemUrl);\n }\n }\n\n return itemIds.join(',');\n}\n\nfunction getCategoryObject() {\n return {\n 'page:title': getCategoryTitle(),\n 'page:url': getUrl(),\n 'items:ids': getCategoryIds()\n };\n}\n\n/** *********** ITEM TRACKING **************/\n\nfunction getItemId() {\n var url = getUrl();\n return url.split('products/')[1];\n}\n\nfunction getGroupId() {\n return bouncex.utils.getNestedProp('meta.product.id');\n}\n\nfunction getItemCopy() {\n return bouncex.utils.getNestedProp('meta.product.variants')[0].name.split(' -')[0];\n}\n\nfunction getItemCategory() {\n var refferer = bouncex.utils.getNestedProp('affirm.Rollbar.instrumenter._document.doctype.parentNode.referrer');\n\n if (refferer.indexOf('/collections') > -1) {\n return refferer.split('collections/')[1].split('?')[0];\n } else {\n return 'global';\n }\n}\n\nfunction getItemPrice() {\n return jQuery('#ProductPrice-product-template').text().replaceAll('$', '');\n}\n\nfunction getItemImage() {\n return jQuery('meta[property=\"og:image\"]').attr('content');\n}\n\nfunction itemInStock() {\n if(jQuery('.swatch-container:visible').length > 1){\n if (jQuery('button[name=\"add\"]').first().text().trim() === 'Out of stock' && jQuery('.soldout').length === jQuery('.swatch-container ').children().length) {\n return false;\n }\n } else {\n if(jQuery('#dd-restock-notification-container:visible .da-restock-notification-form').length > 0 && jQuery('button[name=\"add\"]').first().text().trim() === 'Out of stock'){\n return false;\n }\n }\n\n return true;\n}\n\nfunction getItem() {\n return {\n id: getItemId(),\n groupid: getGroupId(),\n copy: getItemCopy(),\n category: getItemCategory(),\n price: getItemPrice(),\n url: getUrl(),\n imageurl: getItemImage(),\n instock: itemInStock()\n };\n}\n\nfunction viewItem(itemId, groupId) {\n bouncex.push(['view item', {\n 'item:id': itemId,\n 'item:itemgroupid': groupId\n }]);\n}\n\n/** ********** CATALOG EVENTS ************/\nfunction trackSku() {\n var allVariants = bouncex.utils.getNestedProp('meta.product.variants'),\n optionLength = jQuery('.label-row').length,\n groupId = getGroupId(),\n itemId = getItemId();\n\n // Fires selectSku when no options are available\n if (optionLength === 0) {\n fireSelectSku(itemId, groupId, bouncex.utils.getNestedProp('meta.product.variants[0].id'));\n }\n\n bouncex.et.on(jQuery(document), 'click.bx', function () {\n bouncex.setTimeout2(function () {\n var selectedColor = jQuery('.slVariant').first().text();\n var selectedSize = jQuery('.slVariant').last().text();\n\n for (var i = 0; i < allVariants.length; i++) {\n var variantData = allVariants[i].public_title.split(' / '),\n variantColor = variantData[0],\n variantSize = variantData[1];\n\n // Checks if there are size and color options or just size\n if (optionLength > 1) {\n if (variantColor === selectedColor && variantSize === selectedSize) {\n fireSelectSku(itemId, groupId, allVariants[i].id);\n }\n } else {\n variantSize = variantData[0];\n if (variantSize === selectedSize) {\n fireSelectSku(itemId, groupId, allVariants[i].id);\n }\n }\n }\n }, 1000);\n }, '.swatch-element label');\n}\n\nfunction trackQuickViewSku() {\n bouncex.et.on(jQuery(document), 'click.bx', function (e) {\n bouncex.setTimeout2(function () {\n var $parentSelector = jQuery(e.target).closest('.grid-view-item'),\n itemUrl = $parentSelector.find('.grid-view-item__link').attr('href'),\n itemId = itemUrl.split('/').pop().split('?')[0],\n groupId = $parentSelector.find('.wk-button-collection').attr('data-wk-add-product'),\n feedId = itemUrl.split('variant=').pop();\n\n fireSelectSku(itemId, groupId, feedId);\n }, 1000);\n }, '.customSwatch');\n}\n\nfunction fireSelectSku(itemId, groupId, feedId) {\n if (itemId && groupId && feedId && feedId !== bouncex.vars.last_selected_sku) {\n bouncex.push([\n 'select_sku',\n {\n 'item:id': itemId,\n 'item:itemgroupid': groupId,\n 'item:feedid': feedId\n }\n ]);\n bouncex.setv('last_selected_sku', feedId);\n bouncex.setBounceCookie();\n }\n}\n\n/** *********** CART EVENTS **************/\n\nfunction addToCart(itemId) {\n var atcButtons = 'button[name=\"add\"]',\n cookie;\n\n if (!itemId) {\n return;\n }\n\n bouncex.off(jQuery(document), 'click.bx', atcButtons);\n bouncex.et.on(jQuery(document), 'click.bx', function () {\n bouncex.et.onTrue(\n function () {\n cookie = bouncex.getBounceCookie(CART_COOKIE);\n return cookie;\n },\n function () {\n bouncex.push(['add to cart', {\n 'item:id': itemId,\n 'cart:token': bouncex.getBounceCookie(CART_COOKIE)\n }]);\n },\n 10\n );\n bouncex.setBounceCookie();\n }, atcButtons);\n}\n\nfunction quickAddToCart() {\n bouncex.et.on(jQuery(document), 'click.bx', function () {\n var cookie,\n itemId = jQuery(this).parents('.grid-view-item').find('.grid-view-item__link').attr('href').split('/').pop();\n\n bouncex.et.onTrue(\n function () {\n cookie = bouncex.getBounceCookie(CART_COOKIE);\n return cookie && itemId;\n },\n function () {\n bouncex.push(['add to cart', {\n 'item:id': itemId,\n 'cart:token': bouncex.getBounceCookie(CART_COOKIE)\n }]);\n },\n 10\n );\n bouncex.setBounceCookie();\n }, '.btn-addto-cart');\n}\n\nfunction emptyCart() {\n bouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\n if (newVal === 0) {\n bouncex.push(['empty_cart']);\n } else {\n bouncex.setv('added_to_cart', true);\n bouncex.setBounceCookie();\n }\n });\n\n if (!!bouncex.vars.added_to_cart && jQuery('.cart-empty-header').length) {\n bouncex.push(['empty_cart']);\n bouncex.log('here');\n bouncex.setv('added_to_cart', false);\n bouncex.setBounceCookie();\n }\n}\n\nfunction replenishCart(cart) {\n if (cart.token) {\n bouncex.utils.cookies.create({\n name: CART_COOKIE,\n value: cart.token\n });\n window.location.href = window.location.pathname + '?bx_replen=true';\n }\n}\n\n/** *********** INITIALIZE TRACKING **************/\n\nfunction initializeUserTracking() {\n var userEmail;\n\n if (bouncex.vars.logged_in && bouncex.vars.logged_in_identified === false) {\n userEmail = getUserEmail();\n }\n\n if (bouncex.utils.validate.email(userEmail)) {\n bouncex.push([\n 'user',\n {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }\n ]);\n bouncex.setv('logged_in_identified', true);\n bouncex.setBounceCookie();\n }\n}\n\nfunction initializeCategoryEvents() {\n var categoryObj = getCategoryObject();\n\n if (categoryObj['items:ids'].length) {\n bouncex.push(['view category', categoryObj]);\n }\n}\n\nfunction handlePDPWishlistID() {\n var trackedWishListIDs = getTrackedWishlistIDsFromRTV(),\n pdpID = getItemId();\n\n if (trackedWishListIDs.indexOf(pdpID) > -1) {\n return;\n }\n\n bouncex.push(['wishlist_item', {\n 'item:id': pdpID\n }]);\n trackedWishListIDs.push(pdpID);\n bouncex.setv('wishlist_ids', trackedWishListIDs.join(', '));\n}\n\nfunction getTrackedWishlistIDsFromRTV() {\n var wishlistIdsString = bouncex.vars.wishlist_ids || '';\n return wishlistIdsString ? wishlistIdsString.split(', ') : [];\n}\n\n\nfunction initWishList() {\n var trackedIds = getTrackedWishlistIDsFromRTV();\n var currentIds = [];\n\n jQuery('button[title=\"Remove from Wishlist\"]').each(function () {\n var url = jQuery(this).closest('.grid-view-item').find('.grid-view-item__link.link-to-product').attr('href');\n var id = url.split('products/')[1];\n currentIds.push(id);\n });\n\n // Create a copy of trackedIds before updating it\n var updatedTrackedIds = trackedIds.slice();\n\n // Compare currentIds with trackedIds and update updatedTrackedIds\n for (var i = 0; i < currentIds.length; i++) {\n var id = currentIds[i];\n if (updatedTrackedIds.indexOf(id) === -1) {\n updatedTrackedIds.push(id);\n }\n }\n\n // Create a new array containing Ids in currentIds that are not in trackedIds\n var newIds = [];\n for (var j = 0; j < currentIds.length; j++) {\n var currentId = currentIds[j];\n if (trackedIds.indexOf(currentId) === -1) {\n newIds.push(currentId);\n }\n }\n\n // Update trackedIds with any new values from updatedTrackedIds\n var uniqueTrackedIds = [];\n for (var k = 0; k < updatedTrackedIds.length; k++) {\n if (uniqueTrackedIds.indexOf(updatedTrackedIds[k]) === -1) {\n uniqueTrackedIds.push(updatedTrackedIds[k]);\n }\n }\n\n // Update trackedIds with the unique values\n trackedIds = uniqueTrackedIds;\n\n // Set updated trackedIds as a comma-separated string in the bouncex.vars.wishlist_ids\n bouncex.setv('wishlist_ids', trackedIds.join(', '));\n bouncex.setBounceCookie();\n\n // Push wishlist_item for each new ID\n newIds.forEach(function (id) {\n bouncex.push(['wishlist_item', {\n 'item:id': id\n }]);\n });\n}\n\n\nfunction initializeItemEvents() {\n var item;\n\n bouncex.et.onTrue(\n function () {\n item = getItem();\n bouncex.log(item);\n return !!item.id &&\n !!item.groupid &&\n !!item.copy &&\n !!item.category &&\n !!item.price &&\n !!item.url &&\n !!item.imageurl;\n },\n function () {\n bouncex.push(['item', item]);\n viewItem(item.id, item.groupid);\n addToCart(item.id);\n },\n 10\n );\n}\n\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n replenish: replenishCart,\n replenishmentType: 'cookie'\n });\n\n emptyCart();\n}\n\nfunction trackWishlist() {\n bouncex.setTimeout2(function () {\n bouncex.et.onVarChange('wishlist_count', function (oldVal, newVal) {\n if (newVal > oldVal) {\n bouncex.push(['wishlist_add', {}]);\n\n if (bouncex.website.pts === 'product') {\n handlePDPWishlistID();\n return;\n }\n initWishList();\n }\n });\n }, 1000);\n}\n\nif (isValidDomain() && isEn()) {\n initializeUserTracking();\n initializeCartEvents();\n trackWishlist();\n\n switch (bouncex.website.pts) {\n case 'category':\n initializeCategoryEvents();\n trackQuickViewSku();\n quickAddToCart();\n initWishList();\n break;\n case 'product':\n initializeItemEvents();\n trackSku();\n break;\n default:\n break;\n }\n}\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.getNestedProp('meta.page.pageType', '') === 'collections' || bouncex.utils.getNestedProp('meta.page.pageType', '') === 'collection' || document.querySelectorAll('meta[property=\"og:title\"][content=\"Bridal Gifts\"]').length > 0 || document.querySelectorAll('meta[property=\"og:title\"][content=\"LAGOS Gift Guide\"]').length > 0;"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkouts"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('meta.page.pageType', '') === 'home';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"shopify-dev"}]]},"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":{"blank_site_element":""},"vars":[{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var index = 0;\n\n if (bouncex.website.pts === 'checkout') {\n return jQuery('.logged-in-customer-information__paragraph').length > 0;\n }\n \n if (window.dataLayer) {\n for (index; index < dataLayer.length; index++) {\n if (dataLayer[index].visitorType === 'Logged In') {\n return true;\n }\n }\n }\n return false;\n})();","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 var cartCount = 0;\n\n if (jQuery('#cart-counter').length > 0){\n return Number(jQuery('#cart-counter').text().replace(/[^0-9.]/g,''));\n }\n\n jQuery('.product-thumbnail__quantity').each(function() {\n cartCount += Number(jQuery(this).text().replace(/[^0-9.]/g,''));\n });\n\n return cartCount;\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"Number(jQuery('span[rv-html=\"cart.total_price | money currency.currentCurrency\"]').text().replace(/[^0-9.]/g,'')) || Number(jQuery('[data-checkout-subtotal-price-target').text().replace(/[^0-9.]/g,''));","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('#ProductPrice-product-template').text().replace(/[^0-9.]/g,'');","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.product-single__title').text().trim();","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function(){\n if(jQuery('.swatch-container:visible').length > 1){\n if (jQuery('button[name=\"add\"]').first().text().trim() === 'Out of stock' && jQuery('.soldout').length === jQuery('.swatch-container ').children().length) {\n return false;\n }\n } else {\n if(jQuery('#dd-restock-notification-container:visible .da-restock-notification-form').length > 0 && jQuery('button[name=\"add\"]').first().text().trim() === 'Out of stock'){\n return false;\n }\n }\n\n return true;\n})","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('#successNewsletterDrawer div').text().toLowerCase().indexOf('congratulations') > -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('#cookie-consent-dialogBox').not('.cc-invisible').length > 0;","trigger":"pageload"},{"name":"last_selected_sku","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"added_to_cart","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"wishlist_count","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.wk-link__count').text();","trigger":"pageload"},{"name":"wishlist_ids","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","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":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 LAGOS mktg txts (like cart reminders) to this #, per terms.","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":"254860397","ga4_measurement_id":"G-W47G9Y2E8R","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_ca58d8b011d1f69498214263486a59c6.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(); }})();