Adding Display Notification Events for Fullpage Interstitials
Once you have clicked on Create in the New Zone screen, you will be presented with the snippet for your new ad zone.
Desktop Fullpage Interstitial and Mobile Fullpage Interstitial zones will be presented with an extra script to be added if needed.
This script adds an event listener to the event called ‘creativeDisplayed’ suffixed with a zone id that is triggered when the ad is displayed to the user.
This event listener allows you to programmatically execute any action you may need on your website and get more information about the element that triggered the event, such as URL, id, classes and text.
Example - Fullpage Interstitial
Added idzone
= 4362883
Action to execute = Display message Creative shown!
<script type="application/javascript" data-idzone="4362883" data-ad_frequency_count="20" data-ad_frequency_period="60" data-type="desktop" data-browser_settings="1" data-ad_trigger_method="3" src="https://a.examplesite.com/fp-interstitial.js"></script>
<a href="https://www.exads.com">Visit exads.com!</a>
<script type="application/javascript">
document.addEventListener('creativeDisplayed-4362883', function (e) {
console.log("Creative shown!");
console.log(e.detail);
console.log(e.detail.elm.href);
}, false);
</script>