From September, Flash will no longer be supported by Chrome. Prepare for the shift towards HTML5 by visiting our Flash to HTML5 help page

Check it out!

Asynchronous TAG solution

Asynchronous tag is a way to load banners asynchronously from the other page elements in order to avoid page-freeze until the banner is fully loaded.

  • How to make it?

    Workflow:

    • Create tag in the system as usuall
    • Copy src attribute of the tag;
    • Paste it as data-adfscript for async tag.
      You will get: <script data-adfscript="…"></script> tag source expression;
    • At the bottom of html document place <script src="//s1.adform.net/banners/scripts/adfscript.js"></script> which loads all async tags.

    Congratulations! You just have made an async tag.

  • Async tag syntax examples

    Asynchronous tag examples

    <script data-adfscript="track.adform.net/adfscript?bn=3831142">
    (function(c,b,e,a,d){
      c.getElementById("adform-adf"+b)||(a=c.createElement(b),
      a.type="text/java"+b,a.async=a.defer=!0,a.id="adform-adf"+b,
      a.src="http"+e+"://s1.adform.net/banners/scripts/adfscript.js?"+Math.round(new Date/6E4),
      (d=c.getElementsByTagName(b)[0]).parentNode.insertBefore(a,d))
    })(document,"script","https:"==location.protocol?"s":"");
    </script>

    or

    <body>
      <script data-adfscript="track.adform.net/adfscript?bn=3831142"></script>
      <script data-adfscript="track.adform.net/adfscript?bn=4778203"></script>
      <!-- also you can define iframe size -->
      <script data-adfscript="track.adform.net/adfscript?bn=4778203" data-width="100" data-height="100"></script> 
    
      ...
    
      <script type="text/javascript">
      (function(c,b,e,a,d){
        c.getElementById("adform-adf"+b)||(a=c.createElement(b),
        a.type="text/java"+b,a.async=a.defer=!0,a.id="adform-adf"+b,
        a.src="http"+e+"://s1.adform.net/banners/scripts/adfscript.js?"+Math.round(new Date/6E4),
        (d=c.getElementsByTagName(b)[0]).parentNode.insertBefore(a,d))
      })(document,"script","https:"==location.protocol?"s":"");
      </script>
    </body>
  • How does it work?

    Inserted adfscript.js script collects all async Adform tags (script tags with data-adfscript attribute) in html document and inserts friendly iFrame (containing corresponding scripts) before each one.
    Because banner placement size is not known beforehand, inserted iFrame waits for initial banner data with banner width and height parameters and resizes itself accordingly.
    So in practice you can have several simple <script data-adfscript="…"></script> tags and at the bottom of html document <script src="//s1.adform.net/banners/scripts/adfscript.js"></script> which loads all tags.

  • Implementation

    Async tag can be placed in all currently supported placements. One exception would be Expanding banners will not work in cross-domain iFrames even though Adform stub file will be present.  More testing with publisher sites needs to be done on friendly iframe support.