【问题标题】:DoubleClick for Publishers "Ad unit did not render."DFP 广告管理系统“广告单元未呈现”。
【发布时间】:2015-12-21 11:00:16
【问题描述】:

由于我是新手,所以这个问题对其他人来说可能很容易。 我的广告未在网络上显示(各种横幅、多个位置、未显示)。 在www.motoraport.pl/stacje 上,我预计右侧会显示 2 个横幅,但插槽是空的。

调试时我会得到类似

的信息
MRPrawa1    
Slot size: 300x250Format: DivService: DFP
Ad unit did not fetch.
Ad unit did not render.
Ad fetch count: 1
Iframe type: none

Warnings:
Ad unit failed to fetch.

-或-

MRPrawa1
Slot size: 300x250Format: DivService: DFP

251 ms to fetch creative
Ad unit did not render.
Ad fetch count: 1
Iframe type: none

但是,如果我单击调试控制台Open Creative in New Window,我会看到横幅图像。 我认为可能是代码混乱,所以我创建了简单的本地主机页面

<!DOCTYPE html>
<html>
    <head>
        <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);
            })();

            googletag.cmd.push(function() {
              googletag.defineSlot('/19844765/MRPrawa1', [300, 250], 'div-gpt-ad-1450140062768-3').addService(googletag.pubads());
              googletag.defineSlot('/19844765/MRPrawa2', [300, 250], 'div-gpt-ad-1450140062768-4').addService(googletag.pubads());
              googletag.pubads().enableSingleRequest();
              googletag.pubads().enableSyncRendering();
              googletag.enableServices();
            });
        </script>
    </head>
    <body>
        <!-- MRPrawa1 -->               
        <!-- /19844765/MRPrawa1 -->
        <div id='div-gpt-ad-1450140062768-3' style='height:250px; width:300px;'>
            <script type='text/javascript'>
                googletag.cmd.push(function() { googletag.display('div-gpt-ad-1450140062768-3'); });
            </script>
        </div>
        <!-- /19844765/MRPrawa2 -->
        <div id='div-gpt-ad-1450140062768-4' style='height:250px; width:300px;'>
            <script type='text/javascript'>
                googletag.cmd.push(function() { googletag.display('div-gpt-ad-1450140062768-4'); });
            </script>
        </div>
    </body>
</html>

但问题仍然存在。有人可以帮忙吗?

【问题讨论】:

  • 不确定是否相关,但会为那些“不可见”的广告素材计入展示次数

标签: google-dfp double-click-advertising


【解决方案1】:

经过几天的风吹草动,我偶然发现&lt;head/&gt;中声明的所有广告位都必须在&lt;body/&gt;中实现。 在我的例子中,根据页面的不同,head 中主要声明了 5 个 slot,body 中使用了 1-2 个 slot。 不知何故,这导致所有广告都空白。 我希望这将有助于其他人通过嵌入 DFP 广告。

【讨论】:

  • 嗯?我从来不知道会是这样。大多数网站不是使用一致的标头包含来初始化每个插槽,然后逐页更改交付吗?
  • 我将主js文件添加到头部,然后将插槽定义移动到带有输出sn -p的主体中。这样,它们只有在输出 div 也存在时才会被定义。
猜你喜欢
  • 2015-01-11
  • 2011-09-30
  • 2015-09-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多