This article explains the Studio iframe solution and how to implement it. This solution lets publishers serve expanding and interstitial creatives in iframes on their sites.
A better alternative is to use the IAB's SafeFrame. SafeFrame is an API-enabled iframe that provides a single, unified mechanism for communication between advertiser and publisher content. SafeFrame technology enables transparent and rich interactions between page content and ads, while providing publisher control and preventing external access to sensitive data.
Web browsers place restrictions on interactions between pages that reside on different domains. This is a security feature designed to prevent pages on one domain from reading data on another. The browser sees the content inside an iframe (the ad) as residing in a different domain from the surrounding page content.
When a website uses iframe ad tags, an iframe is created around the ad. For example, if www.mysite.com has an iframe ad tag that displays an ad from ad.doubleclick.net, the ad is restricted from accessing anything outside the enclosing iframe. This restriction prevents interstitial and expanding creatives from being served through iframe ad tags. However, there are cases, as with ads served by third parties, where publishers want to allow communication from the iframe environment to domains that they trust.
Using the iframe solution
To enable iframe access for Studio ads, a publisher must put a special file on their domain that acts as a bridge between the ad server domain and the publisher domain.
- Download the iframe solution file (
- Add the
DARTIframe.htmlfile to a
/doubleclickfolder at the root directory of the web service on your web servers. For example, if your website is www.example.com, put the
- Place the iframe solution file on all domains and subdomains where the ad will serve.
This solution only works for ads served using Studio.
The default location for the
DARTIframe.html file is a directory called
doubleclick at the root directory of a your web server. For example, for the publisher domain www.mysite.com, the URL to the
DARTIframe.html file would be:
If the file is located elsewhere, add a key value pair to the ad tag to provide the location of the file. The key value pair is
[directory] is the folder path from the server's root directory. For example, if the file is located at:
use the key value pair:
Depending on your server software, the
DARTIframe.html filename may be case sensitive. Be sure to keep the original spelling and casing when placing the file on your server.