Can we make yllix Ads only load if specific function is triggered?

I’m currently developing a web application where users can access certain links after a countdown timer expires. During this waiting period, I’d like to display Yllix ads to make the experience more engaging & to make some $$. However, I’ve encountered a challenge in optimizing the performance of loading my web pages because these ads load even if they are hidden {display:none;} giving a laggy bad experience impression to my users. What i want exactly is loading these ads only if the countdown timer is triggered, otherwise it shouldn’t be loaded in background. Well i asked ChatGPT and Copilot both of them gave me dynamic executing solution but all of these methods not excuting the internal documents of the Ad Units i think because the yllix Ad units only load if they are place in pure html.
My attempt to dynamically append the Yllix ads without success indicates a potential limitation with Yllix’s implementation. Is there a workaround or alternative approach to achieve this? I’m open to any suggestions or insights on how to seamlessly integrate Yllix ads into my countdown timer functionality. And just a Note: i can’t use Adsens please don’t ask me to switch to other Ad Networks. Thank you in advance for your help.
Here’s my ylixx Ad Unite (300×250 Banner):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code><!--bannerAd-->
<script type="text/javascript" src="https://udbaa.com/bnr.php?section=dlAds&pub=452969&format=300x250&ga=g"></script>
<noscript><a href="https://yllix.com/publishers/452969" target="_blank"><img src="//ylx-aff.advertica-cdn.com/pub/300x250.png" style="border:none;margin:0;padding:0;vertical-align:baseline;" alt="ylliX - Online Advertising Network" /></a></noscript>
</code>
<code><!--bannerAd--> <script type="text/javascript" src="https://udbaa.com/bnr.php?section=dlAds&pub=452969&format=300x250&ga=g"></script> <noscript><a href="https://yllix.com/publishers/452969" target="_blank"><img src="//ylx-aff.advertica-cdn.com/pub/300x250.png" style="border:none;margin:0;padding:0;vertical-align:baseline;" alt="ylliX - Online Advertising Network" /></a></noscript> </code>
<!--bannerAd-->
<script type="text/javascript" src="https://udbaa.com/bnr.php?section=dlAds&pub=452969&format=300x250&ga=g"></script>
<noscript><a href="https://yllix.com/publishers/452969" target="_blank"><img src="//ylx-aff.advertica-cdn.com/pub/300x250.png" style="border:none;margin:0;padding:0;vertical-align:baseline;" alt="ylliX - Online Advertising Network" /></a></noscript>

Here’s a simplified version of my countDown web app:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>document.addEventListener('DOMContentLoaded', function() {
const countdownOverlay = document.getElementById('countDownOverlay');
const countdownMessage = document.getElementById('countDownBlock');
const countdownElement = document.getElementById('countdown');
const links = document.querySelectorAll('.googledrive, .mega, .megaup, .torrent');
let currentLink = null;
// Event listener to handle link clicks
links.forEach(link => {
link.addEventListener('click', function(event) {
event.preventDefault();
if (currentLink === null) {
currentLink = this;
lockLink(this);
startCountdown(this.href);
this.classList.add('unlocked');
} else if (this === currentLink) {
window.open(this.href, '_blank');
currentLink = null;
this.classList.remove('unlocked');
}
});
});
function lockLink(link) {
link.classList.add('locked');
link.setAttribute('disabled', 'disabled');
}
function unlockLink() {
if (currentLink) {
currentLink.classList.remove('locked');
currentLink.removeAttribute('disabled');
}
}
function startCountdown(url) {
let countdownValue = 10;
countdownOverlay.style.cssText= 'display:block';
countdownMessage.style.cssText= 'display:block';
countdownElement.textContent = countdownValue;
const interval = setInterval(() => {
countdownValue--;
countdownElement.textContent = countdownValue;
if (countdownValue === 0) {
clearInterval(interval);
unlockLink();
countdownOverlay.style.cssText= 'display:none';
countdownMessage.style.cssText= 'display:none';
// Here I need to inject and execute Yllix ads
// How can I achieve this without breaking the Ad units?
}
}, 1000);
}
</code>
<code>document.addEventListener('DOMContentLoaded', function() { const countdownOverlay = document.getElementById('countDownOverlay'); const countdownMessage = document.getElementById('countDownBlock'); const countdownElement = document.getElementById('countdown'); const links = document.querySelectorAll('.googledrive, .mega, .megaup, .torrent'); let currentLink = null; // Event listener to handle link clicks links.forEach(link => { link.addEventListener('click', function(event) { event.preventDefault(); if (currentLink === null) { currentLink = this; lockLink(this); startCountdown(this.href); this.classList.add('unlocked'); } else if (this === currentLink) { window.open(this.href, '_blank'); currentLink = null; this.classList.remove('unlocked'); } }); }); function lockLink(link) { link.classList.add('locked'); link.setAttribute('disabled', 'disabled'); } function unlockLink() { if (currentLink) { currentLink.classList.remove('locked'); currentLink.removeAttribute('disabled'); } } function startCountdown(url) { let countdownValue = 10; countdownOverlay.style.cssText= 'display:block'; countdownMessage.style.cssText= 'display:block'; countdownElement.textContent = countdownValue; const interval = setInterval(() => { countdownValue--; countdownElement.textContent = countdownValue; if (countdownValue === 0) { clearInterval(interval); unlockLink(); countdownOverlay.style.cssText= 'display:none'; countdownMessage.style.cssText= 'display:none'; // Here I need to inject and execute Yllix ads // How can I achieve this without breaking the Ad units? } }, 1000); } </code>
document.addEventListener('DOMContentLoaded', function() {
const countdownOverlay = document.getElementById('countDownOverlay');
const countdownMessage = document.getElementById('countDownBlock');
const countdownElement = document.getElementById('countdown');

const links = document.querySelectorAll('.googledrive, .mega, .megaup, .torrent');
let currentLink = null;

// Event listener to handle link clicks
links.forEach(link => {
    link.addEventListener('click', function(event) {
        event.preventDefault();
        if (currentLink === null) {
            currentLink = this;
            lockLink(this);
            startCountdown(this.href);
            this.classList.add('unlocked');
        } else if (this === currentLink) {
            window.open(this.href, '_blank');
            currentLink = null;
            this.classList.remove('unlocked');
        }
    });
});

function lockLink(link) {
    link.classList.add('locked');
    link.setAttribute('disabled', 'disabled');
}

function unlockLink() {
    if (currentLink) {
        currentLink.classList.remove('locked');
        currentLink.removeAttribute('disabled');
    }
}

function startCountdown(url) {
    let countdownValue = 10;
    countdownOverlay.style.cssText= 'display:block';
    countdownMessage.style.cssText= 'display:block';
    countdownElement.textContent = countdownValue;

    const interval = setInterval(() => {
        countdownValue--;
        countdownElement.textContent = countdownValue;

        if (countdownValue === 0) {
            clearInterval(interval);
            unlockLink();
            countdownOverlay.style.cssText= 'display:none';
            countdownMessage.style.cssText= 'display:none';
            
            // Here I need to inject and execute Yllix ads
            // How can I achieve this without breaking the Ad units?
        }
    }, 1000);
}

});

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật