简体   繁体   English

Google DFP-安全框架-扩展广告

[英]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.

相关问题 Google DFP-从内部调整SafeFrame自定义广告素材外部iframe容器的尺寸(展开广告) - Google DFP - Resize SafeFrame custom creative outer Iframe container from inside (expand ad) 点击事件的 Google DFP 广告展示 - Google DFP Ad show for click events Google广告dfp js代码未呈现所有广告位 - Google ad dfp js code is not rendering all ad slots 如何将变量动态传递到Google DFP广告管理系统广告代码 - How do I pass variables to Google DFP ad tag dinamically 如何检测Google DFP广告管理系统DFP广告的加载状态? - How to detect loading state of a Google Doubleclick for Publishers DFP Ad? Google DFP广告管理系统-刷新广告位,不增加新的展示次数 - Google DFP - Refresh AD slot without New Impression Count Google广告管理系统(DFP)提供空白/空广告素材 - Google Ad Manager (DFP) Deliver Blank/Empty Creative 如何使用Google DFP广告管理系统显示来自ad_unit的特定广告? - How can I display a specific ad from an ad_unit using Google DFP? Google 广告单元 (DFP) 会在呈现广告时显示编号。 我应该如何隐藏那个号码? - Google ad units (DFP) shows number along with the ad on render. How should I hide that number? 无法访问 Google adx 返回的安全框内容 - Unable to access contents of a safeframe returned by Google adx
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM