I have to get Google Doubleclick ads placed in the Newspaper theme and could use some help.
Am I going to have to use a plugin to get this to work since Newspaper is built for adsense only? They seem pretty complicated to use, so I am hoping there is a simple way to do this.
I have posted the codes that were sent to me:
THE FIRST ONE IS SUPPOSED TO BE PUT IN THE HEADER
<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’;
var node = document.getElementsByTagName(‘script’)[0];
node.parentNode.insertBefore(gads, node);
})();
</script>
<script type=’text/javascript’>
googletag.cmd.push(function() {
googletag.defineSlot(‘/6732/insidestl/homepage’, [970, 90], ‘insidestlhome-0’)
.addService(googletag.pubads());
googletag.defineSlot(‘/6732/insidestl/homepage’, [300, 250], ‘insidestlhome-1’)
.addService(googletag.pubads());
.setTargeting(“pos”, “top”);
googletag.defineSlot(‘/6732/insidestl/homepage’, [300, 250], ‘insidestlhome-2’)
.addService(googletag.pubads());
.setTargeting(“pos”, “bot”);
googletag.defineSlot(‘/6732/insidestl/homepage’, [728, 90], ‘insidestlhome-3′)
.addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
THIS ONE IS SUPPOSED TO GO IN THE BODY I WAS TOLD
<!– /6732/insidestl/homepage 970×90 –>
<div id=’insidestlhome-0′ style=”width: 970px; height: 90px”>
<script type=’text/javascript’>
googletag.cmd.push(function() { googletag.display(‘insidestlhome-0′); });
</script>
</div>
<!– End of Tag –>
==========================================================================
<!– /6732/insidestl/homepage 300×250 Top –>
<div id=’insidestlhome-1′ style=”width: 300px; height: 250px”>
<script type=’text/javascript’>
googletag.cmd.push(function() { googletag.display(‘insidestlhome-1′); });
</script>
</div>
<!– End of Tag –>
==========================================================================
<!– /6732/insidestl/homepage 300×250 Bottom –>
<div id=’insidestlhome-2′ style=”width: 300px; height: 250px”>
<script type=’text/javascript’>
googletag.cmd.push(function() { googletag.display(‘insidestlhome-2′); });
</script>
</div>
<!– End of Tag –>
==========================================================================
<!– /6732/insidestl/homepage 728×90 –>
<div id=’insidestlhome-3′ style=”width: 728px; height: 90px”>
<script type=’text/javascript’>
googletag.cmd.push(function() { googletag.display(‘insidestlhome-3’); });
</script>
</div>
<!– End of Tag –>
==========================================================================
insideSTL_homepage_body.txt
Displaying insideSTL_homepage_body.txt.
Hello,
The theme was built to work with adsense or custom ads using this method: https://forum.tagdiv.com/using-other-ads/ but i do not think it will work with the doubleclick ad.
In this case you have 2 ways to go about it. You can either use an ad render plugin like adroate for example (not sure which one will work best with doubleclick)
Or you can follow this topic and try out the method posted here by one of our users: https://forum.tagdiv.com/topic/tutorial-responsive-ads-with-google-dfp/
I hope this helps.
Thank you!
