Hello.
and at place to show within body:
<div id="div-gpt-ad-some-id">
<script>
googletag.cmd.push(function() {
googletag.display("div-gpt-ad-some-id");
});
</script>
</div>
But I think this code will block browser's parsing process at the script in body.
And I think it's better in a point of view of page speed like that:
<!--at place to show within body-->
<div id="div-gpt-ad-some-id"></div>
<!--at bottom of body-->
<script>
window.addEventListener('DOMContentLoaded',function(){
googletag.cmd.push(function() { googletag.display("div-gpt-ad-some-id") });
});
</script>
I would like to ask you how do you think.
For your information, I attached 4 files.
case 1: code DFP's suggestion
1-1. chrome's timeline
1-2. source code
case 2: my version(after DOMContentLoaded event)
2-1. chrome's timeline
2-2. source code
All the best
Takeshi