We want to publish our ad codes via davwheat Ad Units in the admin panel, but the plugin only allows ins tags to be published. There is no such code structure in Google Ad Manager (Formerly doubleclick). Isn't there a way we can publish these ad units tags without interfering with the site resource files?
GAM can give us name unit tags in two different formats. You can see examples below;
1. Tag Format
Copy and paste this tag code and place it between the <head></head> of your HTML document.
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<script>
window.googletag = window.googletag || {cmd: []};
googletag.cmd.push(function() {
googletag.defineSlot('/ID/ADUNITNAME', [300, 250], 'div-gpt-ad-ID0-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
Copy and paste this tag code and place it between the <body></body> of your HTML document.
<!-- /ID/ADUNITNAME-->
<div id='div-gpt-ad-ID-0' style='min-width: 300px; min-height: 250px;'>
<script>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-ID-0'); });
</script>
</div>
2. Tag Format (Passback)
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<div id="gpt-passback">
<script>
window.googletag = window.googletag || {cmd: []};
googletag.cmd.push(function() {
googletag.defineSlot('/ID/ADUNITNAME', [300, 250], 'gpt-passback').addService(googletag.pubads());
googletag.enableServices();
googletag.display('gpt-passback');
});
</script>
</div>
Is there a way to publish these tags from the panel? Otherwise, how can we place ad units tags through Google Ad Manager?
* We have also examined the suggestions in the following topic, but since there is no solution for the problem we are experiencing, we decided to open a separate topic.
https://discuss.flarum.org/d/28506-davwheat-ad-units