Products

106 artículos
var monitor = setInterval(function(){ var elem = document.activeElement; if(elem && elem.tagName == 'IFRAME' && elem.parentElement.id == 'shopify-chat'){ clearInterval(monitor); console.log(parseInt(elem.style.height.replace('px',''))); if(parseInt(elem.style.height.replace('px',''))>300){ console.log(elem.style.height); window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'chat_started' }); } } }, 1000);