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!

Friendly and non-Friendly IFrames

Rich Media ads are typically served with Javascript ad calls that do not work with AJAX and other dynamic coding frameworks. In addition, the ads may make calls to document.write which interferes with the rest of an AJAX-based webpage. In order to solve these problems, the Ad Ops Council (IAB) recommends a Friendly IFrame (FIF) solution.

  • Friendly or nonFriendly IFrame?

    Friendly IFrame (FIF)

    A Friendly IFrame is an IFrame that shares the same domain as the main page it is hosted on. This generally means that the content is trusted and hence, can ‘break out’ of the IFrame and manipulate the content on the hosting page. Friendly IFrame is some kind of interactive and communicating frame.

    Non-Friendly IFrame

    A non-friendly IFrame is hosted under a different domain to that which the IFrame tag is hosted on. Under the 'same-origin-policy', the content of the IFrame cannot interact with the page on which it is hosted.

     

    • How to recognize a friendly ifame?
      • Usually it’s source attribute ‘src’ is set to a small advertisement page file in the same domain as the page or ‘src’ is set to “about:self”.
      • IFrame has a script element used to push advertisement from ad delivery system.
      • In order to identify for the advertisement’s code that it is running in friendly dynamic IFrame a variable called 'inDapIF = true' is generated in the IFrame document.
      • Friendly IFrames is a solution for loading ads proposed by IAB.


    • How to check if IFrame is friendly or not using browser's console?
      • Open site in Google Chrome browser;
      • Select iframe where ad is located;
      • Execute the code below:

        window.parent.document.getElementById('outframe-element-id');

        If it shows errors IFrame is unfriendly,  otherwise - when IFrame is friendly we will get element by predifined id in return.
  • IFrame manager

    When Adform tags are used in non-friendly IFrame on site, there are issues with expandable/floating banners. Banner doesn't "come out" of an IFrame bounds or call floating function doesn't work as intended. In order to get Adform tag functioning as it should (for example - to expand) an IFrameManager file should be implemented on that particular site. 

    IFrame manager file source URL: http://www.adform.com/IFrameManager.html

    Placed on particular site domain IFrame manager gets hosted under some path, like: http://www.somedomain.com/../IFrameManager.html
    This IFrame manager path should be added in Adform system for that particular media where the banner runs. Media is found going to System settings > Media> Find   section. Once media administration settings page is opened in edit mode, navigate to TAG Format subsection and add link to IFrame Manager in the 'Stub File location' field.

    Important: http://www.somedomain.com/../IFrameManager.html and http://abc.somedomain.com/../IFrameManager.html are 2 different domains. Pay attention that IFrameManager file should be placed under the same domain where the ad runs.

     

    In case campaign setup is programmatic, IFrame manager needs to be placed in a specific place/location on publisher domain:
    publisher_domain.com/adform/IFrameManager.html

    There is no need to setup path in Adform platform.

    How to know if IFrameManager is loaded on site?

    When Adform tag is loading on site, with some Web Debugging tool or simply with browser's developer tools you may track various network requests for javascripts, images, css and so on. If you go to browser's developers tools in Chrome browser (might be called with F12 button press) > Network section and search for "Stub", you will get filtered web request like this:

    Stub File

    Note: this filter will give no results if tag was loaded in friendly iframe.

     

    Opening stub file request in new window/tab you will see the one of 3 possible results:

    1. IFrame manager (stub file) is implemented on site:
      Adform.stubFile(
      {
          url: "http%3A%2F%2Fabc.somedomain.com%2Fsitefiles%2FIFrameManager.html",
          exists: true
      }
      )
    2. IFrame manager (stub file) is NOT implemented on site:
      Adform.stubFile(
      {
          url: "",
          exists: false
      }
      )
    3. IFrame manager (stub file) is NOT implemented on site as on predefined url it wasn't found:
      Adform.stubFile(
      {
          url: "http%3A%2F%2Fabc.somedomain.com%2Fsitefiles%2FIFrameManager.html",
          exists: false
      }
      )

     

  • Sample data collection from tags in IFrames

    When Adform banner is loaded in non-friendly iframe we are not able to collect sample data.

    Historical fact

    We stopped counting in-screen impressions from banners served on non-friendly iframes just after September 15th, 2012. From that day - an impression are NOT sampled for Media using non-friendly iframes in all cases.

    Technical verification

    When the banner loads, a particular code from Adform (bootstrap.js) loads also and detects that the banner is placed in non-friendly iframe. According to that, Adserving system then do not initiate engagement tracker and therefore unload string doesn't contain any banner visibility and timed engagement measurements, such as in-screen impressions, visibility time, engagement time, etc.
    Regarding friendly iframes - everything is collected depending on banner visibility and timed engagement measurements rules: an impression is counted as in-screen when 50% or more of a banner is visible for a user. Also note that impressions can only be sampled for banners served via JavaScript tags.