【问题标题】:Add DFP DoubleClick inside a Facebook Instant article在 Facebook Instant 文章中添加 DFP DoubleClick
【发布时间】:2016-04-15 08:43:42
【问题描述】:

如何在 Facebook Instant 文章中添加 DFP 广告?我使用 DoubleClick 服务。

我需要知道我应该在“数字”中添加什么的示例:

<figure class="op-ad">
    <!-- Use this for your ads -->
    <iframe src="https://www.adserver.com/ss;adtype=banner320x50" height="50" width="320"></iframe>
</figure>

谢谢

【问题讨论】:

  • 我尝试了简化的 url 标签,在 facebook 即时文章中显示的创意但它不可点击,因为它只是没有 clicktag 的创意。 :( 有人有解决方案吗?
  • 我还尝试了一个静态 HTML 文件,其中 DFP 通过 GPT 与 adunit 集成。但它不起作用......

标签: facebook ads google-dfp facebook-instant-articles


【解决方案1】:

我建议使用Doubleclick's GPT tag,但要注意将整个广告代码放置在 iFrame 中(而不是调用 head 元素)。下面是一个例子:

<figure class="op-ad"><iframe height=“250" style="border:0;margin:0;padding:0;" width="300”>
<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” (http://www.googletagservices.com/tag/js/gpt.js%E2%80%9D);
var node = document.getElementsByTagName(“script”)[0];
node.parentNode.insertBefore(gads, node);
})();
</script><script type="text/javascript">
googletag.cmd.push(function() {
googletag.defineSlot("/1234/travel/asia/food", [[300, 250]], "div-gpt-ad-123456789-1").addService(googletag.pubads()).setTargeting(“abc”, “xyz”).setTargeting(“123”, “456”);
googletag.pubads().collapseEmptyDivs();
googletag.enableServices();
});
</script><div id="div-gpt-ad-123456789-1">
<script type="text/javascript">
googletag.cmd.push(function() { googletag.display(“div-gpt-ad-123456789-1”); });
</script></div>
</iframe>
</figure>

【讨论】:

    【解决方案2】:

    AdPlugg 允许您执行此操作。您上面的代码将变为:

    <figure class="op-ad">
        <!-- Use this for your ads -->
        <iframe src="http://www.adplugg.com/serve/<your_adplugg_access_code>/html/1.1/index.html?zn=fb_zone_1" height="50" width="320"></iframe>
    </figure>
    

    然后,您可以从您的 AdPlugg 帐户中放入来自 Google 的标签。然后,您还可以轮换联盟网络广告、您自己的直接购买广告等。

    这应该就是您所需要的,但如果您愿意,您可以在我发布的博客中阅读有关如何设置 Facebook Instant Article 广告的更多信息:Facebook Instant Article Ads

    免责声明:我为 AdPlugg 工作。

    【讨论】:

      【解决方案3】:

      使用 GPT 准备一个 DFP 集成静态 HTML 文件,如下所示:

      <!DOCTYPE html>
      <html>
      <head>
      <meta charset="UTF-8">
      <title></title>
      <style type="text/css">html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style>
      <script type="text/javascript">
        (function() {
          var useSSL = 'https:' == document.location.protocol;
          var src = (useSSL ? 'https:' : 'http:') +
              '//www.googletagservices.com/tag/js/gpt.js';
          document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
        })();
      </script>
      <script type="text/javascript">
          googletag.defineSlot('/YOUR_DFP_ACCOUNT_NUMBER/YOUR_ADUNIT_CODE', [300, 250], 'div-gpt-ad-1459514019072-0').addService(googletag.pubads());    
          googletag.enableServices();
      </script>
      
      </head>
      
      <body>
      <div id="div-gpt-ad-1459514019072-0">
          <script type="text/javascript">
              googletag.display('div-gpt-ad-1459514019072-0');
          </script>
      </div>
      </body>
      
      </html>
      

      保存并托管在 http://example.com/fbia-banner.html

      之类的地方

      现在使用 Facebook Instant Article (FBIA) 广告语法调用此 URL:

      <figure class="op-ad">
          <iframe height="250" width="300" src="http://example.com/fbia-banner.html"></iframe>
      </figure>
      

      并使用 FBIA 测试工具测试整个页面代码。

      注意事项:

      • 使用像这种解决方案这样的代理文件并不是最好的解决方案,如果有一个直接的 DFP URL 来提供就更好了。我尝试了 DFP 简化的 url 标记,但它不适合在 FBIA 中使用

      【讨论】:

        【解决方案4】:

        Facebook 抱怨 iframe 标签上有“宽度”和“高度”属性,您应该删除它们。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2017-02-18
          • 1970-01-01
          • 2016-10-22
          • 1970-01-01
          • 2016-02-16
          • 1970-01-01
          • 1970-01-01
          • 2016-10-29
          相关资源
          最近更新 更多