(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":4907,"name":"Adrianna Papell","cookie_name":"bounceClientVisit4907","domain":"adriannapapell.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-43191715-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":" /* ---------------------------- SHARED VARIABLES ---------------------------- */\r\n\r\n var CART_COOKIE_KEY = 'cart';\r\n\r\n /* --------------------------------- HELPERS -------------------------------- */\r\n\r\n function getUrl() {\r\n return bouncex.utils.url.allowParams(['q']);\r\n }\r\n\r\n function setVarAndCookie(varName, value) {\r\n bouncex.setVar(varName, value);\r\n bouncex.setBounceCookie();\r\n }\r\n\r\n function getIdFromUrl(url) {\r\n return url.split(\"?\").shift().split(\"/\").pop();\r\n }\r\n\r\n function addProtocol(url) {\r\n return url && url.match(/^\\/\\//) ? \"https:\" + url : url;\r\n }\r\n\r\n function getImageUrl() {\r\n var imgUrl = jQuery('img[id*=\"product-featured-image\"]').attr('src') || '';\r\n if (imgUrl) {\r\n imgUrl = bouncex.utils.url.allowParams([], imgUrl);\r\n }\r\n return imgUrl && imgUrl.indexOf('https:') === -1 ? 'https:' + imgUrl : imgUrl;\r\n }\r\n\r\n function parseShopifyObject(){\r\n var script = $('script').filter(function() {\r\n return $(this).text().indexOf('ShopifyAnalytics.meta.currency') !== -1;\r\n });\r\n if (script) {\r\n var scriptData = script.text();\r\n var pattern = /var\\s+meta\\s+=\\s+({.*?});/;\r\n var match = scriptData.match(pattern);\r\n if (match) {\r\n try {\r\n return JSON.parse(match[1]);\r\n } catch(e) {\r\n return false;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /* ------------------------------ ITEM TRACKING ----------------------------- */\r\n\r\n function getItem() {\r\n var shopifyObj = parseShopifyObject();\r\n var product = shopifyObj ? shopifyObj.product : {};\r\n var firstVariant = (product.variants || [])[0] || {};\r\n\r\n var productId = jQuery('input[name=\"product-id\"]').first().val()\r\n || (product && product.id)\r\n || getIdFromUrl(getUrl());\r\n\r\n // Try common selectors for product name\r\n var productName = jQuery(\"h1.productView-title, h1.product-single__title, h1.page-title, h1\").first().text().trim();\r\n\r\n return {\r\n id: productId ? productId.toString() : \"\",\r\n copy: productName || (product && product.title) || \"\",\r\n category: product.type || 'Global',\r\n url: getUrl(),\r\n imageurl: addProtocol(getImageUrl()),\r\n price: bouncex.vars.prod_price || firstVariant.price || '',\r\n instock: typeof firstVariant.available !== \"undefined\" ? firstVariant.available : true\r\n };\r\n}\r\n\r\n\r\n\r\n function fireViewItem(item) {\r\n bouncex.push(['view item', {\r\n 'item:id': item.id,\r\n 'item:itemgroupid': jQuery('input[name=\"product-id\"]').first().val() || ''\r\n }]);\r\n \r\n }\r\n\r\n function isExcluded(item) {\r\n return item.url.indexOf('gift-card') > -1;\r\n }\r\n\r\n function initializeItemEvents() {\r\n var item = getItem();\r\n\r\n\r\n if (!item.id || isExcluded(item)) return;\r\n\r\n bouncex.push(['item', item]);\r\n \r\n\r\n fireViewItem(item);\r\n initializeATCClickTracking(item.id);\r\n initializeQuickViewAddToCart();\r\n initializeFrenzyATCTracking();\r\n initializeSelectSku();\r\n\r\n bouncex.setVar('last_fired_item_id', item.id);\r\n}\r\n\r\n\r\n\r\n/* ------------------------------ SKU TRACKING ------------------------------ */\r\n\r\nfunction initializeSelectSku() {\r\n jQuery(document).off('click', 'input[name=\"SIZE\"]');\r\n\r\n jQuery(document).on('click', 'input[name=\"SIZE\"]', function() {\r\n var $el = jQuery(this);\r\n var productId = jQuery('input[name=\"product-id\"]').val() || '';\r\n var variantId = $el.data('variant-id');\r\n\r\n // Find variant in Shopify object\r\n var shopifyObj = parseShopifyObject();\r\n var variant = (shopifyObj.product.variants || []).find(v => v.id == variantId);\r\n\r\n var feedId = variant ? variant.sku : ''; // use SKU as feedId\r\n\r\n console.log(\"[BounceX DEBUG] select_sku\", {\r\n productId, variantId, feedId\r\n });\r\n\r\n bouncex.push(['select_sku', {\r\n 'item:id': productId.toString(), // same as view_item\r\n 'item:itemgroupid': productId,\r\n 'item:feedid': feedId // matches feed correctly\r\n }]);\r\n });\r\n}\r\n\r\n\r\n\r\n\r\n\r\n /* ---------------------------- CATEGORY TRACKING --------------------------- */\r\n\r\n /*function getItemIdsCat() {\r\n var ids = [],\r\n $tiles = jQuery('[class*=\"product_title\"] a');\r\n\r\n $tiles.each(function(){\r\n var id = getIdFromUrl(jQuery(this).attr(\"href\"));\r\n if (id && ids.indexOf(id) === -1) ids.push(id);\r\n });\r\n\r\n return ids.join(',');\r\n }*/\r\n \r\n /* -------SOTEC-16214----------- */\r\n \r\n function getItemIdsCat() {\r\n var ids = [],\r\n $tiles = jQuery('.frenzy_product_item');\r\n\r\n $tiles.each(function () {\r\n var id = jQuery(this).data('product_id');\r\n if (id && ids.indexOf(id) === -1) {\r\n ids.push(id);\r\n }\r\n });\r\n\r\n return ids.join(',');\r\n}\r\n \r\n\r\n function getCategoryObject() {\r\n return {\r\n 'page:url': getUrl(),\r\n 'items:ids': getItemIdsCat()\r\n };\r\n }\r\n\r\n function initializeCategoryEvents() {\r\n bouncex.et.onTrue(\r\n function() {\r\n var categoryObj = getCategoryObject();\r\n return !!categoryObj['items:ids'].length && !!categoryObj['page:url'];\r\n },\r\n function() {\r\n bouncex.push(['view category', getCategoryObject()]);\r\n \r\n },\r\n 10\r\n);\r\n\r\n }\r\n\r\n /* ------------------------------- CART EVENTS ------------------------------ */\r\n\r\nbouncex.vars.cart_has_items = false;\r\n\r\nfunction fireAddToCart(productId) {\r\n var token;\r\n bouncex.et.onTrue(\r\n function() { \r\n token = bouncex.getBounceCookie('cart');\r\n return token;\r\n },\r\n function() {\r\n bouncex.push(['add to cart', {\r\n 'item:id': productId.toString(), // now productId instead of variantId\r\n 'cart:token': token\r\n }]);\r\n\r\n if (!bouncex.vars.cart_has_items) {\r\n bouncex.vars.cart_has_items = true;\r\n watchEmptyCart();\r\n }\r\n },\r\n 10\r\n );\r\n}\r\n\r\nfunction initializeATCClickTracking() {\r\n /*jQuery(document).on('submit', 'form[action*=\"/cart/add\"]', function(e) {\r\n var productId = jQuery('input[name=\"product-id\"]').first().val(); // use product-id instead of variant id\r\n if (!productId) return;\r\n fireAddToCart(productId);\r\n });*/\r\n\r\n jQuery(document).on('click', '.productView-buttons #product-add-to-cart', function(e) {\r\n var productId = jQuery('input[name=\"product-id\"]').first().val(); // again, product-id\r\n if (!productId) return;\r\n fireAddToCart(productId);\r\n });\r\n}\r\n\r\nfunction initializeQuickViewAddToCart() {\r\n jQuery(document).off('click', '.quick_view_cart_content #product-add-to-cart');\r\n jQuery(document).on('click', '.quick_view_cart_content #product-add-to-cart', function () {\r\n var productId = jQuery(this).closest('form').find('[name=\"product-id\"]').val();\r\n if (productId) {\r\n fireAddToCart(productId);\r\n }\r\n });\r\n}\r\n\r\nfunction initializeFrenzyATCTracking() {\r\n jQuery(document).off('click', '.frenzy_container .frenzy_add_to_cart_btn');\r\n jQuery(document).on('click', '.frenzy_container .frenzy_add_to_cart_btn', function () {\r\n var acbtn = jQuery(this);\r\n var product = acbtn.closest('.frenzy_product_item');\r\n var productId = product.data('product_id'); \r\n if (productId) {\r\n fireAddToCart(productId);\r\n }\r\n });\r\n}\r\n\r\n\r\n\r\nbouncex.vars.cart_item_count = 0;\r\n\r\nfunction watchEmptyCart() {\r\n function checkCartEmpty() {\r\n jQuery.getJSON('/cart.js', function(cart) {\r\n var currentCount = cart.item_count || 0;\r\n\r\n // Fire only when cart goes from >0 → 0\r\n if (currentCount === 0 && bouncex.vars.cart_item_count > 0) {\r\n bouncex.push(['empty_cart']);\r\n }\r\n\r\n // Update the last known cart count\r\n bouncex.vars.cart_item_count = currentCount;\r\n });\r\n }\r\n\r\n // Poll cart periodically\r\n var pollInterval = setInterval(checkCartEmpty, 4000);\r\n\r\n // Delegated click for remove/empty cart buttons\r\n jQuery(document).on('click', '#CartDrawer button, .cart__remove, .cart__empty', function() {\r\n setTimeout(checkCartEmpty, 500); // wait for AJAX remove\r\n });\r\n}\r\n\r\n\r\n\r\n\r\n function initializeCartEvents() {\r\n bouncex.et.cart.init({\r\n replenishmentType: 'cookie',\r\n replenish: function(cart) {\r\n bouncex.utils.cookies.create({\r\n name: 'cart',\r\n value: cart.token\r\n });\r\n window.location.href = window.location.origin + window.location.pathname + '?bx_replen=true';\r\n }\r\n });\r\n\r\n \r\n watchEmptyCart();\r\n}\r\n\r\n /* ------------------------------ USER TRACKING ----------------------------- */\r\n\r\n function getUserEmail() {\r\n return bouncex.utils.getNestedProp('theme.customerEmail');\r\n }\r\n\r\n function initializeUserTracking() {\r\n if (!bouncex.vars.logged_in || !!bouncex.vars.logged_in_identified) return;\r\n var userEmail = getUserEmail();\r\n if (!bouncex.utils.validate.email(userEmail)) return;\r\n\r\n bouncex.push(['user', { email: userEmail, source: 'LoggedIn' }]);\r\n setVarAndCookie('logged_in_identified', true);\r\n \r\n }\r\n\r\n /* --------------------------- TRIGGER MANUAL BW ---------------------------- */\r\n\r\n function initializeNativeFooterTracking() {\r\n bouncex.et.on(jQuery('form#ContactFooter'), 'submit.bx', fireRequestemail);\r\n }\r\n\r\n function fireRequestemail() {\r\n var parentInboxCampaign = '2163018',\r\n email = jQuery('footer.footer .footer-block__newsletter input[type=\"email\"]').val();\r\n\r\n if(bouncex.utils.validate.email(email)){\r\n bouncex.push(['requestemail', {\r\n email: email,\r\n campaignId: parentInboxCampaign,\r\n testmode: bouncex.testmode.bxdev ? 1 : 0\r\n }]);\r\n \r\n }\r\n }\r\n\r\n /* --------------------------- INITIALIZE TRACKING -------------------------- */\r\n\r\n function isValidDomain() {\r\n return getUrl().indexOf('adriannapapell.com') > -1;\r\n }\r\n\r\n function isEn() {\r\n return jQuery('html').attr('lang') === 'en';\r\n }\r\n\r\n function isValidForTracking() {\r\n return isValidDomain() && isEn();\r\n }\r\n\r\n function init() {\r\n if (!isValidForTracking()) return;\r\n\r\n initializeUserTracking();\r\n initializeCartEvents();\r\n initializeNativeFooterTracking();\r\n\r\n switch(bouncex.website.pts) {\r\n case 'category':\r\n case 'search':\r\n initializeCategoryEvents();\r\n break;\r\n case 'product':\r\n initializeItemEvents();\r\n \r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n init();\r\n\r\n bouncex.log('%c Tracking updated3', 'color:magenta');","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('ShopifyAnalytics.meta.page.pageType', '') === 'collection';"}]]},"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('ShopifyAnalytics.meta.page.pageType', '') === 'home';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"iygel.xyz"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('ShopifyAnalytics.meta.page.pageType', '') === 'product';"}]]},"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":"!!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('span[data-cart-count]').first().text());\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","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(/[^0-9.]/g, ''));\n }\n if (bouncex.website.pts === 'cart') {\n return Number(jQuery('.cart-subtotal__price').text().replace(/[^0-9.]/g, ''));\n }\n if (!Number(jQuery('.previewCartTotals-value').first().text().trim().replace(/[^0-9.]/g, ''))) {\n return 0;\n }\n return Number(jQuery('.previewCartTotals-value').first().text().trim().replace(/[^0-9.]/g, '')) || null;\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('div[data-section-type=\"product\"] .price-item, .price-item').last().text().split('- ').pop().replace(/[^0-9.]/g, '');","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery(\"h1.productView-title\").first().text().trim()","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('#product-add-to-cart').first().text().trim().indexOf('Add to cart') > -1","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('form#footer_newsletter .form-message--success:visible').length > 0 || jQuery('.ajax-failed-message p:visible').text().trim().toLowerCase().indexOf('welcome back') > -1 || jQuery('.halo-popup .form-message--success:visible').length > 0 || 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":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_images","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"","code":"(function () {\n var $tiles = jQuery('#CartDrawer .ajaxcart__product .grid__item .ajaxcart__product-image img'),\n urls = [];\n if ($tiles.length > 0) {\n $tiles.each(function () {\n urls.push(jQuery(this).attr('src').replace('small', 'large'));\n })\n }\n return urls.join(',');\n})();","trigger":"pageload"},{"name":"chkout_txt_msg_optin","polling":"all","persist":"visit","page_types":["checkout"],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"last_fired_item_id","polling":"none","persist":"visit","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":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":"","eventSharing":false,"shqId":"","enabled":1},"pde":true,"fmc":["US"],"fme":true,"fmx":"","uid2":false,"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,"devMode":0},"ga4_property_id":"278008738","ga4_measurement_id":"G-WWEJNJJ2QE","tag_state_domain":"","tag_state_domain_enabled":false} ; 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":"f14a7e616ae9af2ab566672424ab9c3d","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"80c5f44531fa694e643c58392143dd81","onsite":"c05f8c5551fa6b964660ad61916291c1","sms":"e39203556bab2366e56296ce42e974a7","websdk":"9a65ab96520f390bb65a5ecce3f5ef5a","website_campaigns_4907":"c1ff5666413fb3dd6c05f1744bd7503a"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_c81e76ee00d795b1eebf8d27949f8dc5.br.js'); runtime.setAttribute('async', 'async'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_a23918e2ae41787aed601e77285fe247.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_c84323e2726f3e99b307ab7740c6434b.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() {}; }; runtime.onload = bouncex.initializeTag; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();