Closed oyilmaztekin closed 5 years ago
Burada example var; https://www.npmjs.com/package/react-dfp
Google DFP id; 61966246
Şu an sayfadaki kullanım şekli.
Burada da yayınlama şekli.
google.com/dfp
adresinden giriş yapabilirsin.
ozer.yilmaztekin@elluga.com mailini yönetici olarak tanımladım.
Mantığı şöyle;
1 - Envanter tanımlıyorsun. ( Bunu biz yapıyoruz ) Boyutu şekli şemali tanımlanıyor.
2 - Bu reklam birimi için daha sonra etiket tanımlanıyor.
Bu etikette sayfaya ekleniyor.
Mantığı bu şekilde.
Abi ellerine sağlık gayet güzel anlatmışsın. Ben bununla alakalı olarak bi araştırma yapayım detaylı başlamadan önce.
react-dfp bizim state manager #102 da olduğu gibi... implementasyonu ile aynı altyapıyı kullandığı için çakışma olmaması için iyi kurgulmak lazım.
Bir de asıl test edilmesi gereken bir şey var; bir sayfada sadece bir tane DFPSlotsProvider
kullanabiliyoruz. Aşağıdaki kodda Adslot
componenti her bir reklam gösterim alanını ifade ediyor. InfiniteScroll kullandığımız için sıradaki Article
componenti oluştuğu zaman AdSlot
componentini oluşturacağız. Yani DFPSlotsProvider
componentini her article özel ayarlayamayız.
<DFPSlotsProvider dfpNetworkId={'9999'} adUnit={"foo/bar/baz"} ... >
...
<AdSlot adUnit={"home/leaderboard"} sizes={[ [900, 90], [728, 90]]} />
...
/* you can override the props */
<AdSlot adUnit={"home/mobile"} sizes={[ [300, 250], [300, 600]]} />
...
<div>
...
<AdSlot adUnit={"home/footer"} sizes={[ [300, 250], [300, 600]]} />
...
</div>
...
</DFPSlotsProvider>
DFPSlotsProvider: this component is only meant to configure global options, it follows the context provider pattern ( see this link for details ), you should only declare and mount one instance of this component per page (tipically as higher as possible on the tree so all the nodes can access the context variables.)
reklam-dfp
response
type
: reklam_alani_dfp
Yayıncı ID
= dfpNetworkId
: 61966246 ( hesap yönetici id si)reklam_birimi_adi
= _divid : anasayfa_masthead
reklam_birimi_adi
= _divid : AnasayfaMastHead
( panel script i nasıl veriyorsa... ) reklam_birimi_id
: 1550058370232-0
- google'dan div-gpt-ad-1553767868243-0
şeklinde veriliyor. Şu an gereksiz gibi görünüyor.<head>
kodları<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('/61966246/AnasayfaMastHead', [970, 250], 'div-gpt-ad-1553767868243-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
<!-- /61966246/AnasayfaMastHead -->
<div id='div-gpt-ad-1553767868243-0' style='height:250px; width:970px;'>
<script>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1553767868243-0'); });
</script>
</div>
@zekpehlivan
CardManager
veya cards
componenti için dataset içerisinde reklam content i. ( cat-gundem
içerisine gömülmüş reklam content i gibi. O datasette kaç tane reklam göstereceksek... ) InfiniteScroll
için de dataset kullanalım... (one-cikanlar
içerisine de gömülebilir kategoriye göre ayrı dataset de olabilir one-cikanlar-reklam-dfp
gibi...)@zekpehlivan anasayfa_sol1 için iki tane genişlik ve yükseklik parametresi geliyor bana. Bunlar nasıl çalışıyor tam olarak? Aşağıdaki örneği baz alırsak mesela160x600
, 120x800
şeklinde mi?
{
"boyut_genislik": "160,120",
"boyut_yukseklik": "600,800"
}
Aynen dediğin gibi, 160x600, 600x800 olarak çalışıyor.
@oyilmaztekin Bu ikili sistem oluyor değil mi?
@zekpehlivan ayarlarız bir şekilde doğrusu buysa. react-dfp
de buna uygun bir kullanım var. sizes
olarak geçiyor. Daha ileri seviye kullanımlar için de sizeMappping
var. Mesela tarayıcı boyutuna göre kullanımlar için sizeMapping
yapıyoruz.
Okdir. Kategori bazında da ekleme yaptım...
Bir inceleyebilirsin...
Gündem masthead ve sag alan 300x250 olarak yaptım...
AdSlot
componenti sadece DFPProvider
context wrapper ı ile aynı seviyede çalışıyor. Child componentlerde AdSlot
çalışmıyor.
Bu konu biraz çetrefilli. Bunu buradan tartışmak, bağlantıları paylaşmak daha uygun olacak.
80