2016-04-05 14 views
3

DFP reklamlarımı Anlık makalemde nasıl ekleyeceğimi anlamaya çalışıyorum. Onunla herhangi bir deneyimi var mı? Facebook, bunun mümkün olduğunu belirtti ancak DFP'de veya başka herhangi bir yerde herhangi bir belge göremiyorumDFP Hızlı makale

cevap

2

Dokümanlarına göre iki yol vardır. https://developers.facebook.com/docs/instant-articles/ads-analytics. Otomatik yerleşimi kullandık ve yaklaşımımız, reklamı yalnızca reklam için (tam doküman) görüntülemek için bir rota oluşturmak ve daha sonra gerekli iframe src'si aracılığıyla URL'yi kullanmaktı.

İşte
<header>  
    <figure class="op-ad"> 
     <iframe src="your src" height="250" width="300"></iframe> 
    </figure> 
</header> 
1

bir anlık madde vücutta koymak için bir GPT etiketi örneği:: Vücutta

<head> 
    <meta property="fb:use_automatic_ad_placement" content="true"> 
</head> 

: Belgenin başlığında

Kullanmak zorunda (Denedim Facebook yardımına örnek ve) fazla hata olduğu

<figure class="op-ad"> 
    <iframe height="250" width="300"> 
     <script async='async' src='https://www.googletagservices.com/tag/js/gpt.js'></script> 
     <script> 
      var googletag = googletag || {}; 
      googletag.cmd = googletag.cmd || []; 
     </script> 

     <script> 
      googletag.cmd.push(function() { 
       googletag.defineSlot('/XXXXXX/FB_Articles_300x250', [300, 250], 'div-gpt-ad-XXXXXXXXX-0').addService(googletag.pubads()); 
       googletag.enableServices(); 
      }); 
     </script> 
     <!-- /133801272/FB_Articles_300x250 --> 
     <div id='div-gpt-ad-XXXXXXXXX-0'> 
      <script> 
       googletag.cmd.push(function() { googletag.display('div-gpt-ad-XXXXXXXXX-0'); }); 
      </script> 
     </div> 
    </iframe> 
    </figure> 

anında başlığında bu çizgiyi koymak unutmayın bir MADDE:

<!doctype html> 
    <html lang="pt-br" prefix="op: http://media.facebook.com/op#"> 
    <head> 
     <meta charset="utf-8"> 
     <link rel="canonical" href="https://yoursite/your-article/"> 
    <meta property="fb:use_automatic_ad_placement" content="true"> 

     <meta property="fb:article_style" content="default"> 

     <meta property="op:markup_version" content="v1.0"> 
    </head> 
    <body> 

     <article> 
      <header> 
       <!-- cover --> 
        <figure class="op-ad"> 
    <iframe height="250" width="300"> 
     <script async='async' src='https://www.googletagservices.com/tag/js/gpt.js'></script> 
     <script> 
     var googletag = googletag || {}; 
     googletag.cmd = googletag.cmd || []; 
     </script> 

     <script> 
     googletag.cmd.push(function() { 
      googletag.defineSlot('/XXXXXX/FB_Articles_300x250', [300, 250], 'div-gpt-ad-XXXXXXXXX-0').addService(googletag.pubads()); 
      googletag.enableServices(); 
     }); 
     </script> 
     <!-- /133801272/FB_Articles_300x250 --> 
     <div id='div-gpt-ad-XXXXXXXXX-0'> 
     <script> 
      googletag.cmd.push(function() { googletag.display('div-gpt-ad-XXXXXXXXX-0'); }); 
     </script> 
     </div> 
    </iframe> 
    </figure> 
           <figure> 
         <img src="https://yoursite/your-article/image.jpg" /> 

             </figure> 

       <!-- The title and subtitle shown in your Instant Article --> 
       <h1>Title;</h1> 

       <!-- author(s) --> 
       <address> 
        Writen by <a>Author</a> 
           </address> 

       <!-- publication date/time --> 
       <time class="op-published" datetime="2016-08-16T17:47:42+00:00">16 ago 2016</time> 

       <!-- modification date/time --> 
       <time class="op-modified" datetime="2016-08-16T17:47:42+00:00">16 ago 2016</time> 

      </header> 

<!-- Article body goes here (CONTINUE LIKE A NORMAL INSTANT ARTICLE) --> 
:

bir bağlamda bir örnek,

İlgili konular