<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="Google Web Designer 16.1.0.0530">
<meta name="template" content="Banner 3.0.0">
<meta name="environment" content="gwd-dv360">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html, body {width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;}
.gwd-page-container {position: relative; width: 300px; height: 250px; background-color: #f0f0f0;} /* Fallback background */
.gwd-page-content {position: absolute; width: 300px; height: 250px;}
.gwd-image {width: 300px; height: 250px; display: block;}
</style>
<script src="https://s0.2mdn.net/ads/studio/Enabler.js"></script>
</head>
<body>
<div class="gwd-page-container">
<div class="gwd-page-content">
<img src="300x250.gif" class="gwd-image" id="banner-image" alt="Banner" onload="this.style.display='block';" onerror="this.parentNode.style.backgroundColor='#f0f0f0'; this.style.display='none';">
</div>
</div>
<script type="text/javascript">
// Define clickTag as a global variable
window.clickTag = "https://example.com"; // Replace with your actual URL
// Initialize Enabler
function initAd() {
if (window.Enabler) {
Enabler.setClickThroughUrl(window.clickTag);
Enabler.addEventListener(studio.events.StudioEvent.INIT, function() {
Enabler.startTimer('AdLoaded');
if (Enabler.isInitialized()) {
Enabler.finish();
}
});
} else {
console.log("Enabler not loaded, using fallback");
document.getElementById('banner-image').style.display = 'block'; // Fallback to show background
}
}
// Handle click event
document.getElementById('banner-image').addEventListener('click', function() {
if (window.Enabler && Enabler.isInitialized()) {
Enabler.exit('Click_Through');
} else {
window.open(window.clickTag, '_blank');
}
});
// Ensure ad initializes on load
if (document.readyState === 'complete' || document.readyState === 'interactive') {
initAd();
} else {
document.addEventListener('DOMContentLoaded', initAd);
}
</script>
</body>
</html>
4
2
55KB
155KB
246.0ms
268.0ms
247.0ms