[英]Google DFP - Safeframe - Exapanding Ad
HELP!! 救命!!
I am in need of some example code on how to get an custom expanding ad to work in google DFP. 我需要一些示例代码,说明如何获取自定义展开式广告以在Google DFP中运行。 Or just a simple example on how to call a javascript function on the parent page from DFP to expand the ad. 还是一个简单的示例,说明如何通过DFP广告管理系统在父页面上调用javascript函数来展开广告。
I know that enableSyncRendering(); 我知道enableSyncRendering(); loads the ads out of the iframe but then it take longer for the page to load since we have more then one ad on the page. 将广告从iframe中加载出来,但是页面加载需要更长的时间,因为我们在页面上放置了不止一个广告。
I have read from here, https://support.google.com/dfp_premium/answer/6023110?hl=en , that i can use safeframes and not have to do enableSyncRendering();. 我从这里https://support.google.com/dfp_premium/answer/6023110?hl=zh_CN阅读到,我可以使用安全框架,而不必执行enableSyncRendering();。 But every time i do the creative just loads into a 1x1 iframe from dfp and i cant bust out.. 但是每次我做广告时,都会从dfp加载到1x1 iframe中,而我无法破产。
THANKS!! 谢谢!!
All of the examples that are compatible with DFP are available here: http://publisherconsole.appspot.com/safeframe/creative-preview.html 与DFP广告管理系统兼容的所有示例均在此处提供: http : //publisherconsole.appspot.com/safeframe/creative-preview.html
I've managed to get the expansion working (I wanted push which isn't supported by DFP) so if you've followed the examples - I can only suggest that you're targeting a 1x1 advert and so that default advert size is 1x1 pixels. 我已经设法使扩展正常工作(我想要推送,但DFP广告管理系统不支持该功能),因此,如果您按照示例进行操作-我只能建议您定位1x1广告,并且默认广告尺寸为1x1像素。
The example page was a little difficult to follow at first -but you can literally just include the whole "Creative content" into a custom advert and it'll work as shown (as long as you set a 500x500 ad slot) 该示例页面一开始很难理解-但是您可以从字面上仅将整个“广告素材内容”包含到自定义广告中,并且它将按所示工作(只要您设置了500x500广告位)
GPT should be loading the ad using a friendly iFrame. GPT应该使用友好的iFrame加载广告。 Try using parent.document to get parent's DOM. 尝试使用parent.document获取父级的DOM。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.