', { src: 'https://leadbooster-chat.pipedrive.com/assets/loader.js' }).appendTo('body').on('load', function() { ( function() { var w = window; if (w.LeadBooster) { console.warn('LeadBooster already exists'); } else { w.LeadBooster = { q: [], on: function(n, h) { this.q.push({ t: 'o', n: n, h: h }); }, trigger: function(n) { this.q.push({ t: 't', n: n }); }, }; } })(); }); } setTimeout(function() { if (!isScrollTriggered) { executeCode(); } }, 15000); $(window).on('scroll', function() { if (!isScrollTriggered && $(window).scrollTop() >= 50) { isScrollTriggered = true; executeCode(); } }); });