The Irish Store: Irish Knitwear, Homewares & Jewelry on SALE { let time = 0, loop = setInterval(() => { time++; if (‘undefined’ !== typeof fbq) { AEC.EventDispatcher.trigger(‘ec.facebook.loaded’, {}); clearInterval(loop); } if (time > 100) { console.log(‘Failed to detect ec.facebook.loaded event.’); clearInterval(loop); } }, 100); })(); ]]> { if (summary) { let getSummary = (event) => { AEC.Request.post(“https://www.theirishstore.com/datalayer/index/cart/”,{ event:event }, (response) => { dataLayer.push(response); }); }; [‘ec.cookie.remove.item.data’,’ec.cookie.update.item.data’,’ec.cookie.add.data’].forEach(event => { AEC.EventDispatcher.on(event, (event => { return () => { setTimeout(() => { getSummary(event); }, 2000); }; })(event)); }); } })(AEC.summary); ]]>
Try Adsterra Earnings, it’s 100% Authentic to make money more and more.
The store will not work correctly in the case when cookies are disabled.
JavaScript seems to be disabled in your browser. For the best experience on our site, be sure to turn on Javascript in your browser.
{ let bind = () => { Object.entries( { addToCart: event => { AEC.add(event.currentTarget, dataLayer); }, removeFromCart:event => { AEC.remove(event.currentTarget, dataLayer); }, productClick:event => { AEC.click(event.currentTarget, dataLayer); }, addToWishlist:event => { AEC.wishlist(event.currentTarget, dataLayer); }, addToCompare:event => { AEC.compare(event.currentTarget, dataLayer); }, addToCartSwatch:event => { AEC.addSwatch(event.currentTarget, dataLayer); } }).forEach(([event, callback]) => { […document.querySelectorAll(‘[data-event]:not([data-bound])’)].filter(element => { return element.dataset.event === event; }).forEach(element => { element.addEventListener(‘click’, callback); element.dataset.bound = true; }); }); }; bind(); if(“PerformanceObserver” in window) { const observer = new PerformanceObserver((items) => { items.getEntries().filter(({ initiatorType }) => initiatorType === “xmlhttprequest”).forEach((entry) => { bind(); }); }); observer.observe( { entryTypes: [“resource”] }); } }); ]]> { var PromotionTrack = ((dataLayer) => { return { apply: () => { var promotions = [], position = 0; document.querySelectorAll(‘[data-promotion]’).forEach(promotion => { let entity = { id: promotion.dataset.promotionId, name: promotion.dataset.promotionName, creative: promotion.dataset.promotionCreative, position: promotion.dataset.promotionPosition }; AEC.EventDispatcher.trigger(‘ec.cookie.promotion.entity’, entity, { element: promotion }); promotions.push(entity); promotion.addEventListener(‘click’, (event) => { var data = { ‘event’: ‘promotionClick’, ‘ecommerce’: { ‘promoClick’: { ‘promotions’: [ { ‘id’: event.target.dataset.promotionId, ‘name’: event.target.dataset.promotionName, ‘creative’: event.target.dataset.promotionCreative, ‘position’: event.target.dataset.promotionPosition } ] } } }; AEC.Cookie.promotionClick(data, promotion).push(dataLayer); /** * Save persistent data */ AEC.Persist.push(AEC.Persist.CONST_KEY_PROMOTION, { ‘promotion’:data.ecommerce.promoClick.promotions[0] }); }); }); if (promotions.length) { AEC.Cookie.promotion( { ‘event’:’promoViewNonInteractive’, ‘ecommerce’: { ‘promoView’: { ‘promotions’: promotions } } }).push(dataLayer); } return this; } } })(dataLayer).apply(); }); ]]> { (() => { let map = {}, trace = {}; document.querySelectorAll(‘[data-widget]’).forEach((element) => { let widget = element.dataset.widget; let entity = { id: element.dataset.id, name: element.dataset.name, category: element.dataset.category, brand: element.dataset.brand, list: element.dataset.list, price: parseFloat(element.dataset.price), position: parseFloat(element.dataset.position) }; let attributes = element.dataset.attributes; if (attributes) { Object.entries(JSON.parse(attributes)).forEach(([key, value]) => { entity[key] = value; }); } if (!map.hasOwnProperty(widget)) { map[widget] = []; map[widget].trace = {}; map[widget].entry = []; } if (!map[widget].trace.hasOwnProperty(element.dataset.id)) { map[widget].trace[element.dataset.id] = true; map[widget].entry.push(entity); } }); Object.entries(map).forEach(([key, value]) => { if (value.entry.length) { let data = { event: ‘widgetViewNonInteractive’, ecommerce: { actionField: { list: value.entry.find(Boolean).list, currencyCode: “USD” }, impressions: value.entry } }; if (‘undefined’ !== typeof dataLayer) { (function(callback) { if (AEC.Const.COOKIE_DIRECTIVE) { AEC.CookieConsent.queue(callback).process(); } else { callback.apply(window,[]); } }) ( (function(dataLayer, data) { return function() { AEC.EventDispatcher.trigger(‘ec.widget.view.data’, data); dataLayer.push(data); } })(dataLayer, data) ); } } }); })(); }); ]]> { Object.entries(response.events).forEach(([key, event]) => { dataLayer.push(event); }); }); AEC.EventDispatcher.on(‘ec.facebook.loaded’, () => { }); if (window.google_tag_params) { (function(callback) { if (AEC.Const.COOKIE_DIRECTIVE) { if (!AEC.Const.COOKIE_DIRECTIVE_CONSENT_GRANTED) { AEC.CookieConsent.queue(callback); } else { callback.apply(window,[]); } } else { callback.apply(window,[]); } }) ( (function(dataLayer) { return () => { AEC.Cookie.remarketing({ event:’fireRemarketingTag’, google_tag_params: window.google_tag_params }).push(dataLayer); } })(dataLayer) ); } } else { console.log(‘dataLayer[] is not intialized. Check if GTM is installed properly’); } ]]> Search engine powered by ElasticSuite Copyright © 2016 The Irish Store. All rights reserved.
Source