无法访问Google adx返回的安全框的内容 [英] Unable to access contents of a safeframe returned by Google adx

查看:299
本文介绍了无法访问Google adx返回的安全框的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我在adtech公司工作,当我尝试访问google adx返回的安全框时遇到问题


  2. 我需要在安全框内部获取一个href或img,以检查广告是否即将到来,好像要查找是否有任何广告或是否正在发送广告。


  3. 当我尝试访问安全框的内容时,我收到错误: -





未捕获的DOMException:无法从'HTMLIFrameElement'读取'contentDocument'属性
:阻止了一个原始框架



此处有关于此的更多信息:
https://support.google.com/adxseller/answer/6300696?hl=en
https://support.google.com/adxseller/topic/3376095?hl=zh-CN&ref_topic=2911899


  1. I work in adtech company and have a problem when i try and access an safeframe returned by google adx

  2. I need to get a href or img inside the safeframe to check if ad is coming or not as if to find if anything is coming or no ad is being sent.

  3. When i try and access the contents of the safeframe I get error:-

Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://www.somerandomname.com" from accessing a cross-origin frame.

What should i do in this case as finding out if no ad or ad is returning is important in business sense.

解决方案

That's not possible, because of iframe content is on different domain.

But DFP is smart enought. When you have ADX intergrated in your DFP, you can create conditions, that will prioritise ADX ads here:

More about it here: https://support.google.com/adxseller/answer/6300696?hl=en https://support.google.com/adxseller/topic/3376095?hl=en&ref_topic=2911899

这篇关于无法访问Google adx返回的安全框的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆