Adnuntius Impact

How to integrate Adnuntius Impact into Google Ad Manager.

To make sure that Adnuntius Impact formats can be bought through Prebid and rendered correctly in GAM we have provided a couple of scripts that will help. First if you haven't already, setup your GAM account to render prebid ads. Follow this tutorial if you haven't:

Once that's done you will have a somewhat good understanding on how to setup a prebid line item. That's when you should create a creative for adnuntius impact format.

Create a new third party creative and paste this into the creative script:

<script src=""></script>
    url: '%%PATTERN:url%%', 
    adId: '%%PATTERN:hb_adid%%',
    size: '%%PATTERN:hb_size%%'

This will create a safeframe iframe around the prebid ad and tell the parent script through postMessage to resize the parent iframe. That means that you will have to add a script on your parent page to listen on the message. Either you can add our dedicated script:

<script src="" async></script>

Or if you don't trust external scripts you can just add the snippet below that will let you understand how our script works.

window.addEventListener('message', function (event) {
  document.querySelectorAll('iframe').forEach(iframe => {
    var win = iframe.contentWindow || iframe.contentDocument.defaultView;
    if (win === event.source && {
      var size = = '100%' = size + 'vh' = '100%' = size + 'vh'
}, false);

Basically it just listens to the message from the Google ad and makes the iframe 100% widht and 100vh in height.

Once all of this is done it's recommended to just allow the google ad to be triggered once the sizes are either 1x1px or 1920x1080px ad sizes. The reason would be to not trigger full screen ads on all of the prebid requests.

Last updated