In Google DFP (DoubleClick), you are given an ad code to enter in your headline and another for your body. When I apply this tag / ad code to my website, whether its asynchronous or synchronous ad is always displayed inside the iframe. I am wondering how I will disable iFrame.
Here is the generated header code via DFP:
<script type='text/javascript'> var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; (function() { var gads = document.createElement('script'); gads.async = true; gads.type = 'text/javascript'; var useSSL = 'https:' == document.location.protocol; gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(gads, node); })(); </script> <script type='text/javascript'> googletag.cmd.push(function() { googletag.defineSlot('/16569348/ad-test-1', [400, 267], 'div-gpt-ad-1362958263281- 0').addService(googletag.pubads()); googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); </script>
Here is the generated body code via DFP:
<div id='div-gpt-ad-1362958263281-0' style='width:400px; height:267px;'> <script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-1362958263281-0'); }); </script> </div>
Here is a jsFiddle demonstrating this problem (check the element in google chrome to see iframe):
http://jsfiddle.net/EptwH/
Again, I would like to remove the iframe (and save the image / ad, of course) ... any help would really be appreciated. :)
source share