if ( typeof window.advadsGamHasEmptySlotListener === 'undefined' ) {
googletag.pubads().addEventListener( 'slotRequested', function ( ev ) {
const id = ev.slot.getSlotElementId();
if ( typeof timers[id] === 'undefined' ) {
return;
}
clearTimeout( timers[id] );
timers[id] = setTimeout( function () {
document.dispatchEvent( new CustomEvent( 'aagam_empty_slot', {detail: id} ) );
delete ( timers[id] );
}, 2500 );
} );
googletag.pubads().addEventListener( 'slotResponseReceived', function ( ev ) {
const id = ev.slot.getSlotElementId();
if ( typeof timers[id] !== 'undefined' ) {
clearTimeout( timers[id] );
delete ( timers[id] );
}
if ( ! ev.slot.getResponseInformation() ) {
document.dispatchEvent( new CustomEvent( 'aagam_empty_slot', {detail: id} ) );
}
} );
window.advadsGamHasEmptySlotListener = true;
}
googletag.enableServices();
googletag.display( 'gpt-ad-5244383756652-0' );
} );