Mobile app version of vmapp.org
Login or Join
Correia994

: Can I use single request, SRA, when implement inline-embedded GPT, DFP ad unit I have some adunits that not are shown on every pages. Can I use both the standard-implementation and inline.

@Correia994

Posted in: #GoogleDfp

I have some adunits that not are shown on every pages. Can I use both the standard-implementation and inline.

Is this code ok?

In head-element:

googletag.cmd.push(function() {
googletag.defineSlot('/34352841/ad1', [[250, 480], [250, 250]], 'div-gpt-ad-1474380277357-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.pubads().collapseEmptyDivs();
googletag.enableServices();


});


In body:

<!-- /34352841/ad1 -->
<div id='div-gpt-ad-1474380277357-0'>
<script>
googletag.cmd.push(function () { googletag.display('div-gpt-ad-1474380277357-0'); });
</script>
</div>

<!-- /34352842/ad2 -->
<div id='div-gpt-ad-1474381227986-0'>
<script>
googletag.cmd.push(function () {
googletag.defineSlot('/34352842/ad2', [[250, 480], [250, 250]], 'div-gpt-ad-1474381227986-0').addService(googletag.pubads());
googletag.display('div-gpt-ad-1474381227986-0'); });
</script>
</div>

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Correia994

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme