TriplePixel :: start*/ ~function(W,H,A,L,E,_,B,N){function O(U,T,H,R){void 0===R&&(R=!1),H=new XMLHttpRequest,H.open(“GET”,U,!0),H.send(null),H.onreadystatechange=function(){4===H.readyState&&200===H.status?(R=H.responseText,U.includes(“.txt”)?eval(R):N[B]=R):(299<H.status||H.status<200)&&T&&!R&&(R=!0,O(U,T-1))}}if(N=window,!N[H+"sn"]){N[H+"sn"]=1;try{A.setItem(H,1+(0|A.getItem(H)||0)),(E=JSON.parse(A.getItem(H+"U")||"[]")).push(location.href),A.setItem(H+"U",JSON.stringify(E))}catch(e){}A.getItem('"!nC`')||(A=N,A[H]||(L=function(){return Date.now().toString(36)+"_"+Math.random().toString(36)},E=A[H]=function(t,e){return W=L(),(E._q=E._q||[]).push([W,t,e]),W},E.ch=W,B="configSecurityConfModel",N[B]=1,O("//conf.config-security.com/model",0),O("//triplewhale-pixel.web.app/triplefw.txt?",5)))}}("K","TriplePixel",localStorage); /* < 0?”st=”+c.split(“,”).sort().join(“,”)+”&”:””)+(i.length>0?”af_id=”+i:””),p.parentNode.insertBefore(o,p)}(window,document,”script”,0,”AF”,”banners”,{banners: {key: “9edbcb81-3dfb-45bf-994d-48d3f1618edc”}}) AF(‘banners’, ‘showBanner’) ]]> <![CDATA[(function() { function asyncLoad() { var urls = ["https://s3.amazonaws.com/jstags/15815-4070d53e02f9.js?shop=princesspollydev.myshopify.com","https://z8k8b4s9.stackpathcdn.com/widget/scripts/crazyrocket.start.js?id=60c98ace117cee16805ddd0au0026shop=princesspollydev.myshopify.com","https://d18eg7dreypte5.cloudfront.net/scripts/integrations/subscription.js?shop=princesspollydev.myshopify.com","https://fastsimon.akamaized.net/fast-simon-autocomplete-init.umd.js?mode=shopifyu0026UUID=b830cf80-bc66-4cfd-b990-4aad49caefd1u0026store=6186270804u0026shop=princesspollydev.myshopify.com","https://d18eg7dreypte5.cloudfront.net/browse-abandonment/v2/browse_abandonment.js?shop=princesspollydev.myshopify.com","https://str.rise-ai.com/?shop=princesspollydev.myshopify.com","https://strn.rise-ai.com/?shop=princesspollydev.myshopify.com","https://s.apprl.com/js/apprl.js?shop=princesspollydev.myshopify.com","https://widget.gotolstoy.com/widget/widget.js?app-key=df2a1ee0-efe6-4a65-b8b0-4814fb6e5d59u0026shop=princesspollydev.myshopify.com","https://assets.qrcodegeneratorhub.com/rails_js/redirect.js?shop=princesspollydev.myshopify.com","https://cdn.tapcart.com/mobile-download-banner/banner-min.js?marketingCopy=DOWNLOAD+FOR+SPECIAL+SALES!u0026ctaEvent=getu0026title=Princess+Pollyu0026androidLive=trueu0026iosLive=trueu0026appStoreId=1321227830u0026playStoreId=co.tapcart.app.id_pySrGvs7Ru0026shop=princesspollydev.myshopify.com","//app.backinstock.org/widget/13910_1690479551.js?category=bisu0026v=6u0026shop=princesspollydev.myshopify.com","https://widget.ecocart.tools/ecocart.js?shop_name=princesspollydev.myshopify.comu0026shop=princesspollydev.myshopify.com","//cdn.shopify.com/proxy/949d9802fd4b53408dc0e01d6ff68b69ae03c7a7c99b2f3ac0a96b4facbf4a47/forms-akamai.smsbump.com/151752/form_101266.js?ver=1691538588u0026shop=princesspollydev.myshopify.comu0026sp-cache-control=cHVibGljLCBtYXgtYWdlPTkwMA","//cdn.shopify.com/proxy/e4295df78ee6d85ffc2a7bea014856c2f77cd57e767b7433bcb4b076aad227de/forms-akamai.smsbump.com/151752/form_213253.js?ver=1691616216u0026shop=princesspollydev.myshopify.comu0026sp-cache-control=cHVibGljLCBtYXgtYWdlPTkwMA","https://cdn.routeapp.io/route-widget-shopify/v2/route-widget-shopify-stable-v2.min.js?shop=princesspollydev.myshopify.com","https://connect.nosto.com/script/shopify/nosto.js?merchant=shopify-6186270804u0026shop=princesspollydev.myshopify.com"]; for (var i = 0; i <![CDATA[!function(o){o.addEventListener("DOMContentLoaded",function(){window.Shopify=window.Shopify||{},window.Shopify.recaptchaV3=window.Shopify.recaptchaV3||{siteKey:"6LcCR2cUAAAAANS1Gpq_mDIJ2pQuJphsSQaUEuc9"};var t=['form[action*="/contact"] input[name="form_type"][value="contact"]','form[action*="/comments"] input[name="form_type"][value="new_comment"]','form[action*="/account"] input[name="form_type"][value="customer_login"]','form[action*="/account"] input[name="form_type"][value="recover_customer_password"]','form[action*="/account"] input[name="form_type"][value="create_customer"]','form[action*="/contact"] input[name="form_type"][value="customer"]'].join(",");function n(e){e=e.target;null==e||null!=(e=function e(t,n){if(null==t.parentElement)return null;if("FORM"!=t.parentElement.tagName)return e(t.parentElement,n);for(var o=t.parentElement.action,r=0;r Princess Polly USA | Shop Women's Clothing & Fashion Online { var parent = element.closest(“.fs-popular-searches-list”); if(parent && parent.querySelector(“header.fs-autocomplete-header > span.hasIcon”)){ parent.querySelector(“header.fs-autocomplete-header > span.hasIcon”).innerHTML = “TRENDING SEARCHES”; if(element.getRootNode() && element.getRootNode().querySelector(‘.fast-autocomplete-input’)){ var input = element.getRootNode().querySelector(‘.fast-autocomplete-input’); input.placeholder = ‘SEARCH’; } } }); FastAutocomplete.registerHook(‘render-autocomplete-product-item’, ({product, index, element}) => { var parent = element.closest(“.fast-horizontal-products”); if (parent && parent.querySelectorAll(“header.fs-autocomplete-header > span.hasIcon”).length <![CDATA[(function e(e,n,a,o,t,r,i){function s(e,n){if(document.head){var a=document.createElement("link");e.match(/spin.dev/?/)&&(e+="?fast_storefront_renderer=1"),a.rel="preload",a.href=e,n&&(a.as=n);try{document.head.appendChild(a)}catch(e){console&&console.warn&&console.warn("[Web Pixels Manager] Could not append prefetch link tag to DOM.")}}}var l=i||[],d=null!==e;d&&(window.Shopify=window.Shopify||{},window.Shopify.analytics=window.Shopify.analytics||{},window.Shopify.analytics.replayQueue=[],window.Shopify.analytics.publish=function(e,n,a){window.Shopify.analytics.replayQueue.push([e,n,a])});var c=function(){var e="legacy",n="unknown",a=null,o=navigator.userAgent.match(/(Firefox|Chrome)/(d+)/i),t=navigator.userAgent.match(/(Edg)/(d+)/i),r=navigator.userAgent.match(/(Version)/(d+)(.+)(Safari)/(d+)/i);r?(n="safari",a=parseInt(r[2],10)):t?(n="edge",a=parseInt(t[2],10)):o&&(n=o[1].toLocaleLowerCase(),a=parseInt(o[2],10));var i={chrome:60,firefox:55,safari:11,edge:80}[n];return void 0!==i&&null!==a&&i <![CDATA[(function () { var customDocumentWrite = function(content) { var jquery = null; if (window.jQuery) { jquery = window.jQuery; } else if (window.Checkout && window.Checkout.$) { jquery = window.Checkout.$; } if (jquery) { jquery('body').append(content); } }; var hasLoggedConversion = function(token) { if (token) { return document.cookie.indexOf('loggedConversion=' + token) !== -1; } return false; } var setCookieIfConversion = function(token) { if (token) { var twoMonthsFromNow = new Date(Date.now()); twoMonthsFromNow.setMonth(twoMonthsFromNow.getMonth() + 2); document.cookie = 'loggedConversion=' + token + '; expires=' + twoMonthsFromNow; } } var trekkie = window.ShopifyAnalytics.lib = window.trekkie = window.trekkie || []; if (trekkie.integrations) { return; } trekkie.methods = [ 'identify', 'page', 'ready', 'track', 'trackForm', 'trackLink' ]; trekkie.factory = function(method) { return function() { var args = Array.prototype.slice.call(arguments); args.unshift(method); trekkie.push(args); return trekkie; }; }; for (var i = 0; i { const configElement = document.getElementById(“elevar-gtm-suite-config”); if (!configElement) { console.error(“Elevar Data Layer: Config element not found”); return; } let initialProductAnchorElements = null; const setElements = () => { initialProductAnchorElements = document.querySelectorAll( `a[href*=”/products/”]` ); } if (document.readyState === “loading”) { document.addEventListener(“readystatechange”, setElements) } else { setElements(); } const config = JSON.parse(configElement.textContent); const script = document.createElement(“script”); script.type = “text/javascript”; script.src = config.gtm_suite_script; script.onerror = () => { console.error(“Elevar Data Layer: JS script failed to load”); }; script.onload = async () => { if (!window.ElevarGtmSuite) { console.error(“Elevar Data Layer: `ElevarGtmSuite` is not defined”); return; } const cartData = { attributes:{}, cartTotal: “0.0”, currencyCode:”USD”, items: [] } ; await window.ElevarGtmSuite.handlers.cartAttributesReconcile( cartData, config.event_config.save_order_notes, config.consent_enabled ); if (config.event_config.user) { const data = {cartTotal: “0.0”, currencyCode:”USD”,}; window.ElevarGtmSuite.handlers.user(data); } if (config.event_config.product_add_to_cart_ajax) { window.ElevarGtmSuite.handlers.productAddToCartAjax( config.event_config.save_order_notes, config.consent_enabled ); } if (config.event_config.cart_reconcile) { window.ElevarGtmSuite.handlers.cartItemsReconcile(cartData); }}; document.body.appendChild(script); })(); ]]> { liquid echo ‘general.accessibility.skip_to_content’ | t } 0; window.SwymPageData = {}, window.SwymProductInfo = {}; var unknown = {et: 0}; window.SwymPageData = unknown; window.SwymPageData.uri = window.swymLandingURL; }; if(window.selectCallback){ (function(){ // Variant select override var originalSelectCallback = window.selectCallback; window.selectCallback = function(variant){ originalSelectCallback.apply(this, arguments); try{ if(window.triggerSwymVariantEvent){ window.triggerSwymVariantEvent(variant.id); } }catch(err){ console.warn(“Swym selectCallback”, err); } }; })(); } window.swymCustomerId = null; window.swymCustomerExtraCheck = null; var swappName = (“Wishlist” || “Wishlist”); var swymJSObject = { pid: “VgDgML154ExmrDxYC/KHq3Er7rbnf18CO9JH2jIyw+E=” || “VgDgML154ExmrDxYC/KHq3Er7rbnf18CO9JH2jIyw+E=”, interface: “/apps/swym” + swappName + “/interfaces/interfaceStore.php?appname=” + swappName }; window.swymJSShopifyLoad = function(){ if(window.swymPageLoad) swymPageLoad(); if(!window._swat) { (function (s, w, r, e, l, a, y) { r[‘SwymRetailerConfig’] = s; r[s] = r[s] || function (k, v) { r[s][k] = v; }; })(‘_swrc’, ”, window); _swrc(‘RetailerId’, swymJSObject.pid); _swrc(‘Callback’, function(){initSwymShopify();}); }else if(window._swat.postLoader){ _swrc = window._swat.postLoader; _swrc(‘RetailerId’, swymJSObject.pid); _swrc(‘Callback’, function(){initSwymShopify();}); }else{ initSwymShopify(); } } if(!window._SwymPreventAutoLoad) { swymJSShopifyLoad(); } window.swymGetCartCookies = function(){ var RequiredCookies = [“cart”, “swym-session-id”, “swym-swymRegid”, “swym-email”]; var reqdCookies = {}; RequiredCookies.forEach(function(k){ reqdCookies[k] = _swat.storage.getRaw(k); }); var cart_token = window.swymCart.token; var data = { action:’cart’, token:cart_token, cookies:reqdCookies }; return data; } window.swymGetCustomerData = function(){ return {status:1}; } ]]> { const currencyToRegionDict = { ‘USD’: ‘us.princesspolly.com/products’, ‘AUD’: ‘www.princesspolly.com.au/products’ } const shopCurrency = ‘USD’ if (shopCurrency in currencyToRegionDict) { const newURL = url.replace(‘www.princesspolly.com’, currencyToRegionDict[shopCurrency]) return newURL } return url } // Reduces server calls if a product has a crazy number of images. const MAX_IMAGES_COUNT = 6; // Extracts product handle from the product URL const SHOPIFY_PRODUCT_URL_HANDLE_REGEX = //products/(.[wd-+]+)/; // Sometimes image URLs miss the protocol at the beginning // E.g. ‘//cdn.shopify.com/s/files/…/image.jpg’ const urlSanitizer = url => { if (typeof url === ‘string’) { if (url.startsWith(“//”)) return `https:${url}`; else if (url.toLocaleLowerCase().startsWith(“http”)) return url; else console.log(`Not a valid URL: ${url}`); } else console.log(`Not a valid URL: ${url}`); return null; }; //========== Shopify Ajax API Helper methods =============== const storeApi = {}; storeApi.getProductByUrl = url => { const handle = SHOPIFY_PRODUCT_URL_HANDLE_REGEX.exec(url); if ((typeof handle[1] !== ‘string’) && (handle[1].length > 0)){ console.error(‘The provided URL is hhgfhghs’) return; } return fetch(“/products/” + handle[1] + “.js”, { method: “GET”, headers: { “Content-Type”: “application/json”, }, }).then(resp => resp.json()); }; storeApi.addToCart = itemId => fetch(“/cart/add.js”, { method: “POST”, headers: { “Content-Type”: “application/json”, }, body: JSON.stringify({ items: [ { quantity: 1, id: itemId, }, ], }), }).then(resp => resp.json()); storeApi.updateItemInCart = (itemId, quantity) => fetch(“/cart/update.js”, { method: “POST”, headers: { “Content-Type”: “application/json”, }, body: JSON.stringify({ updates: { [itemId]: quantity, }, }), }).then(resp => resp.json()); storeApi.getCartState = () => fetch(“/cart.js”, { method: “GET”, headers: { “Content-Type”: “application/json”, }, }).then(resp => resp.json()); //=========== Bambuser onReady Handler ================= function getCookie(cname) { let name = cname + ‘=’ let decodedCookie = decodeURIComponent(document.cookie) let ca = decodedCookie.split(‘;’) for (let i = 0; i { // —- Start of player configuration —- const currency = window.Shopify.currency.active player.configure({ currency: currency, locale: “de-DE”, buttons: { dismiss: player.BUTTON.CLOSE, }, }); // —- End of player configuration —- // —- Start of Cart Integrations —- player.on(player.EVENT.ADD_TO_CART, (addedItem, callback) => { let event = new CustomEvent(‘bambuser.addItem’, { detail: addedItem }) document.dispatchEvent(event) storeApi .addToCart(addedItem.sku) .then(res => { if (res.items) { callback(true); console.log(“Item added succussfully!”); } else if (res.description && res.description.includes(“sold out”)) { callback({ success: false, reason: “out-of-stock” }); } else callback(false); }) .catch(error => { callback(false); console.error(“Add to cart error! “, error); }); }); player.on(player.EVENT.UPDATE_ITEM_IN_CART, (updatedItem, callback) => { let event = new CustomEvent(‘bambuser.updateItem’, { detail: updatedItem }) document.dispatchEvent(event) console.log(`Cart updated! ${updatedItem.previousQuantity} –> ${updatedItem.quantity}`); storeApi .updateItemInCart(updatedItem.sku, updatedItem.quantity) .then(res => { if (res.items) { callback(true); console.log(“Item updated succussfully!”); } else callback(false); }) .catch(error => { callback(false); console.error(“Error on updating item! “, error); }); }); player.on(player.EVENT.SYNC_CART_STATE, () => { // Use your method to check if the user has checkout storeApi.getCartState().then(res => { if (res.item_count == 0) { // Emptying the in-player cart player.updateCart({ items: [], }); } }); }); player.on(player.EVENT.CHECKOUT, () => { // Use the showCheckout() method to safely // navigate the user to your checkout page player.showCheckout(window.location.origin + “/cart”); }); // —- End of Cart Integrations —- // —- Start of Product Hydration —- player.on(player.EVENT.PROVIDE_PRODUCT_DATA, (event) => { // Iterates over all the products you have added to the show on the dashboard event.products.forEach(({ ref: sku, id, url }) => { url = convertToRegionSpecificUrl(url) // Your method to fetch a product data storeApi.getProductByUrl(url).then((item) => { //Uncomment the line below for testing //console.log(item); player.updateProduct(id, productFactory => productFactory.product(detailsFactory => detailsFactory .name(item.title) .sku(item.id) .brandName(item.vendor) .description(item.description) .variations(variationFactory => item.variants.map(variation => variationFactory() .attributes(attributeFactory => attributeFactory.colorName(variation.title)) .imageUrls([ // Adding the featured image of the chosen variation (if existed) at the beginning of the images array …(variation.featured_image ? [variation.featured_image.src] : []), // Adding product imgaes …item.images .slice(0, MAX_IMAGES_COUNT – 1) .map(url => urlSanitizer(url)) .filter(url => typeof url === ‘string’), ]) .name(variation.title) .sku(item.id) .sizes(sizeFactory => [ sizeFactory() .name(variation.title) .sku(variation.id) .inStock(variation.available) .price(priceFactory => priceFactory .original(variation.compare_at_price/100) .current(variation.price/100) ) ]) ) ) ) ); }); }); }); }; ]]>
Try Adsterra Earnings, it’s 100% Authentic to make money more and more.
BACK TO SCHOOL
NEW HOMECOMING LOOKS
Featured Shops
THE LATEST RELEASES
THE DENIM TAKEOVER
GET RUSH WEEK READY
DIVE INTO NEW SWIM
SHOP SOFT FIT
Our Sustainability Mission
Learn More
Join to get access to exclusive offers, sales, discounts & other cool perks!
Log In or Sign Up
About Princess Polly
The ultimate global fashion destination for trendsetters who want the latest Insta-ready, TikTok-approved, celeb-worthy looks and they want them now. With daily drops of fresh styles, seriously fast free delivery and easy peasy returns, this weekend’s ‘fit is right here.
<![CDATA[ (function (url) { /*Tracking Bootstrap Set Up DataLayer objects/properties here*/ if(!window.DataLayer){ window.DataLayer = {}; } if(!DataLayer.events){ DataLayer.events = {}; } DataLayer.events.SPIVersion = DataLayer.events.SPIVersion || "3.4.1"; DataLayer.events.SiteSection = "1"; var loc, ct = document.createElement("script"); ct.type = "text/javascript"; ct.async = true; ct.src = url; loc = document.getElementsByTagName('script')[0]; loc.parentNode.insertBefore(ct, loc); }(document.location.protocol + "//tag.rmp.rakuten.com/115345.ct.js")); function getUrlParameter(name) { // could replace this with URLSearchParams + polyfill name = name.replace(/[[]/, '\[').replace(/[]]/, '\]') let regex = new RegExp('[\?&]' + name + '=([^&#]*)') let results = regex.exec(location.search) return results === null ? '' : decodeURIComponent(results[1].replace(/+/g, ' ')) } function getCookie(cname) { let name = cname + '=' let decodedCookie = decodeURIComponent(document.cookie) let ca = decodedCookie.split(';') for (let i = 0; i
front
USD
<![CDATA[ function duringBusinessHours(businessHoursData) { const accountTimezone = businessHoursData['timezone'] const localNow = moment() return businessHoursData['business_hours'].some(function(businessHour) { const businessHoursDays = businessHour['days'].split(',') return businessHoursDays.some(function(businessHourDay) { const day = moment().tz(accountTimezone) .startOf('week') .add(businessHourDay % 7, 'days') const fromTime = day.clone() .add(businessHour['from_time'].split(':')[0], 'hours') .add(businessHour['from_time'].split(':')[1], 'minutes') const toTime = day.clone() .add(businessHour['to_time'].split(':')[0], 'hours') .add(businessHour['to_time'].split(':')[1], 'minutes') return fromTime -1) { container.style.display = ‘none’; } } gorgiasAttempts++; if (gorgiasAttempts >= gorgiasMaxTries) { window.clearInterval(gorgiasChatInterval); } }, 50); ]]>
{ const shadowContainer = document.querySelector(‘.mobile-fast-ac-container’) if (shadowContainer) { const shadowRoot = shadowContainer.shadowRoot if (shadowRoot) { shadowRoot.addEventListener(‘mouseover’, (e) => { let eventTarget = e.target if (!eventTarget.ariaLabel) { eventTarget = eventTarget.closest(‘a’) } if (eventTarget) { if (eventTarget.ariaLabel) { if (eventTarget.ariaLabel.split(‘:’)[0].includes(‘category’)) { createCustomEvent(‘Conversion’, ‘Mobile Search’, ‘PLP for “Collections” items’) } if (eventTarget.ariaLabel.split(‘:’)[0].includes(‘popular search’)) { createCustomEvent(‘Conversion’, ‘Mobile Search’, ‘PLP for “Trending Search” items’) } if (eventTarget.ariaLabel.split(‘:’)[0].includes(‘product name’)) { createCustomEvent(‘Conversion’, ‘Mobile Search’, ‘PDP’) } } } }) clearInterval(mobileAutocompleteABInterval) } } }, 50) // END POLLY-1417 tracking // A/B Test: Cart Icon Design $(document).on(‘click’, ‘[data-minicart-toggle]’, function (e) { createCustomEvent(‘Interaction’, ‘Cart Icon’, ”) }); // A/B Test: Cart Icon Design // Sticky CTA document.querySelectorAll(‘.optBuyBtn’).forEach(function (el) { el.addEventListener(‘click’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Optimize’, eventAction: ‘Interaction’, eventLabel: ‘Sticky CTA’ }); }); }); // Homepage Shop By Category Interaction document.querySelectorAll(‘.homepage-shop-by-category-category’).forEach(function (el) { el.addEventListener(‘click’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Homepage’, eventAction: ‘Interaction’, eventLabel: ‘Shop By Category’ }); }); }); // Navigation Tracking document.querySelectorAll(‘.header__nav a, .mobile-menu a’).forEach(function (el) { el.addEventListener(‘click’, function (e) { if (!window.ga) return var name = e.target.innerText.trim(); if (e.target.classList.value.includes(‘faves’)) { name = ‘Our Faves’; } else if (e.target.classList.value.includes(‘ad__image’)) { name = ‘Ad’; } else if (e.target.classList.value.includes(‘brands__image’)) { name = e.target.parentElement.attributes.href.value; } window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Navigation’, eventAction: ‘Interaction’, eventLabel: name }); var link = e.target.tagName === ‘A’ ? e.target : e.target.closest(‘a’) if(link.hasAttribute(‘data-nav-breadcrumb’)) { try { var hierarchy = JSON.parse(link.getAttribute(‘data-nav-breadcrumb’)) window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Navigation Hierarchy’, eventAction: ‘Interaction’, eventLabel: hierarchy.map(item => item[1]).join(‘ > ‘) }); } catch(error) { console.error(error) } } }); }); // Scroll Through Menu Tracking document.querySelectorAll(‘[data-scroll-nav-link]’).forEach(function (el) { el.addEventListener(‘click’, function (e) { if (!window.ga) return var name = e.target.innerText.trim(); window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Navigation’, eventAction: ‘Interaction’, eventLabel: name }); }) }) // Influencer Circle Tracking document.querySelectorAll(‘[data-homepage-influencer-link]’).forEach(function (el) { el.addEventListener(‘click’, function (e) { if (!window.ga) return var name = el.querySelector(‘[data-homepage-influencer-name]’).innerText.trim(); window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Influencer’, eventAction: ‘Interaction’, eventLabel: name }); }) }) document.querySelectorAll(‘.product__left *’).forEach(function (el) { el.addEventListener(‘click’, function (e) { createCustomEvent(‘Interaction’, ‘PDP’, ‘PDP Image Section Interaction’) }) }) // Nav Recommendation Tracking $(document).on(‘click’, ‘.nav-recommendations__item’, el => { createCustomEvent(‘Interaction’, ‘Navigation’, ‘Desktop Navigation Recommendation Click’) }) $(document).on(‘click’, ‘.boost-pfs-filter-load-more-button’, el => { createCustomEvent(‘Collection Pagination’, ‘Interactions’, el.currentTarget.innerText) }) $(document).on(‘click’, ‘.main–collection .paginate__item, .main–collection .pagination__link’, el => { let eventLabel = el.currentTarget.innerText if (eventLabel === ‘…’) { return } if (el.currentTarget.querySelector(‘.paginate__link–next’) || el.currentTarget.classList.contains(‘pagination__link–next’)) { eventLabel = ‘Right Arrow’ } if (el.currentTarget.querySelector(‘.paginate__link–prev’) || el.currentTarget.classList.contains(‘pagination__link–prev’)) { eventLabel = ‘Left Arrow’ } createCustomEvent(‘Collection Pagination’, ‘Interactions’, eventLabel) }) // Item added to cart document.addEventListener(‘cart.addItem’, function(event) { createCustomEvent(‘AddToCart’, ‘Cart’, event.detail.sku) }) $(document).on(‘click’, ‘#cartpage-nosto-1 *’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Cart’, eventLabel: ‘WTYL Product Recommendations’ }); }); $(document).on(‘click’, ‘#quick-shop-carousel *’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Cart’, eventLabel: ‘TNY Product Recommendations’ }); }); $(document).on(‘click’, ‘.cart-summary__checkout-options .cart-summary__submit, .sticky-checkout-buttons .button’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Cart’, eventLabel: ‘Checkout CTA’ }); }); $(document).on(‘click’, ‘.additional-checkout-button–afterpay’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Cart’, eventLabel: ‘AfterPay CTA’ }); }); $(document).on(‘click’, ‘.mobile-scroll-nav__link’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Mobile Nav’, eventLabel: e.target.innerText }); }); //Sticky header tracking document.querySelectorAll(‘.collection-subnav__link’).forEach(function (el) { el.addEventListener(‘click’, function(event) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Sticky Header’, eventLabel: event.target.innerText }) }) }) if (document.getElementById(‘bc-sf-filter-tree-mobile’)) { document.getElementById(‘bc-sf-filter-tree-mobile’).addEventListener(‘click’, function(event) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Sticky Header’, eventLabel: event.target.innerText }) }) } document.addEventListener(‘bcsf.horizontalFiltersBuilt’, function() { document.querySelectorAll(‘.collection-header__filter–desktop > #bc-sf-filter-tree-h > .bc-sf-filter-option-block > .bc-sf-filter-block-title > a’).forEach(function (el) { el.addEventListener(‘click’, function(event) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Sticky Header’, eventLabel: event.target.innerText }) }) }) }) document.addEventListener(‘bcsf.defaultPaginationBuilt’, function() { document.querySelectorAll(‘.collection-header__pagination .pagination__item > a’).forEach(function (el) { el.addEventListener(‘click’, function(event) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Sticky Header’, eventLabel: ‘Pagination’ }) }) }) }) if (document.getElementById(‘bc-sf-filter-top-sorting’)) { document.getElementById(‘bc-sf-filter-top-sorting’).addEventListener(‘click’, function(event) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Sticky Header’, eventLabel: ‘Collection Sort’ }) }) } document.querySelectorAll(‘.breadcrumbs__link’).forEach(function (el) { el.addEventListener(‘click’, function(event) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Sticky Header’, eventLabel: event.target.innerText }) }) }) document.querySelectorAll(‘.collection-banners’).forEach(function (el) { el.addEventListener(‘click’, function(event) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Sticky Header’, eventLabel: ‘Collection Banner’ }) }) }) document.querySelectorAll(‘.header__nav a, .mobile-menu a’).forEach(function (el) { el.addEventListener(‘click’, function(event) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘Sticky Header’, eventLabel: event.target.innerText }) }) }) $(document).on(‘click’,’.youpay-button’, function (el) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Interactions’, eventAction: ‘YouPay’, eventLabel: ‘MiniCart CTA’ }) }) $(document).on(‘click’, ‘#productpage-nosto-2 .quick-shop-size__button, #productpage-nosto-2-alt .quick-shop-size__button’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Product Recommendation Carousel’, eventAction: ‘Add to Cart’, eventLabel: ‘Similar Style(Nosto)’ }) }) $(document).on(‘click’, ‘#productpage-nosto-3 .quick-shop-size__button, #productpage-nosto-3-alt .quick-shop-size__button’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Product Recommendation Carousel’, eventAction: ‘Add to Cart’, eventLabel: ‘WTYL (Nosto)’ }) }) $(document).on(‘click’, ‘#quick-shop-complete-the-look .quick-shop-size__button’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Product Recommendation Carousel’, eventAction: ‘Add to Cart’, eventLabel: ‘Complete the Look (Accentuate)’ }) }) $(document).on(‘click’, ‘#productpage-nosto-2 *, #productpage-nosto-2-alt *’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Product Recommendation Carousel’, eventAction: ‘Clicks’, eventLabel: ‘Similar Style(Nosto)’ }) }) $(document).on(‘click’, ‘#productpage-nosto-3 *, #productpage-nosto-3-alt *’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Product Recommendation Carousel’, eventAction: ‘Clicks’, eventLabel: ‘WTYL (Nosto)’ }) }) $(document).on(‘click’, ‘#quick-shop-complete-the-look *’, function (e) { if (!window.ga) return window.ga(‘send’, { hitType: ‘event’, eventCategory: ‘Product Recommendation Carousel’, eventAction: ‘Clicks’, eventLabel: ‘Complete the Look (Accentuate)’ }) }) ]]> { $(‘.pp_resale_popup_cta’).trigger(‘click’); e.preventDefault(); }); }); ]]>
{ const getIsActive = () => { const timeout = localStorage.getItem(‘status-timeout’); const isInTimeout = timeout && timeout > Date.now(); return localStorage.getItem(‘status-state’) !== ‘off’ && !isInTimeout; } /** * If not found on this list, account links will just go to the for you page */ const replacements = { ‘/account/logout’: ‘#status-profile’, }; const methods = { /** * Replace existing account links on a page with a link to the widget */ replaceLinks: () => { document.querySelectorAll(‘a[href*=”/account”]’).forEach((el) => { const href = el.getAttribute(‘href’); // External links should be ignored if (href.includes(‘http’) && !href.includes(location.origin)) { return; } // App proxy links should be ignored const prefixes = [‘apps’, ‘a’, ‘community’, ‘tools’] const isAppProxyLink = prefixes.some((prefix) => { return href.startsWith(`${location.origin}/${prefix}/`) || href.startsWith(`/${prefix}/`) }) if (isAppProxyLink) { return; } const replacementLink = replacements[href] ?? ‘#status’; el.setAttribute(‘href’, replacementLink); }); }, /** * Replace links to status hashes. This is for users in fallback mode */ replaceHashes: () => { document.querySelectorAll(‘a[href*=”#status”]’).forEach((el) => { el.setAttribute(‘href’, ‘/account’); }); }, } /** * Watch the page on an interval to replace account links if they’re added after page load */ const watchAccountLinks = () => { setInterval(() => { const method = getIsActive() ? ‘replaceLinks’ : ‘replaceHashes’ methods[method](); }, 200); }; // Replace all account links on the page with a #status link instead const method = getIsActive() ? ‘replaceLinks’ : ‘replaceHashes’ methods[method](); // Continue to replace links, in case account links are added after page load watchAccountLinks(); })() ]]>
Published By
Latest entries
- allPost2025.01.222 Ways You Can Use Онлайн-казино с хорошими отзывами и высокой репутацией To Become Irresistible To Customers
- allPost2025.01.22‘We believe in redemption’: Johnson responds to Trump’s pardons of Jan. 6 rioters
- allPost2025.01.22JD Vance’s first time in the Oval Office
- allPost2025.01.22LIVE: 97th Academy Awards nominations | NBC News