Reputation: 11
I'm trying to launch some ads using Ad Manager. when I generate the ad tag and run it on a test page, it doesn't work. I've taken the ad tags directly from Ad Manager and implemented them, as is, for testing purposes.
Here's the example implementation with some mock test ads;
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<script>
window.googletag = window.googletag || {cmd: []};
googletag.cmd.push(function() {
var REFRESH_KEY = 'refresh';
var REFRESH_VALUE = 'false';
googletag.defineSlot('/XXXXXXXXXXX/desktop_footer_728x90', [[970, 90], [728, 90], [1, 1]], 'div-gpt-ad-1588045067863-0').setTargeting(REFRESH_KEY, REFRESH_VALUE).addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
<div id='div-gpt-ad-1588045067863-0'>
<script>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1588045067863-0'); });
</script>
</div>
</body>
</html>
When this renders, it results in the following;
<div id="gpt_unit_/XXXXXXXXXXX/XXXXX_XXXXXX_NAME" data-google-query-id="CLDR5_WWmOkCFUmVaAodifwBzg">
<div id="google_ads_iframe_/XXXXXXXXXXX/XXXXX_XXXXXX_NAME_1__container__" style="border: 0pt none; width: 468px; height: 60px;"></div>
</div>
<iframe id="google_osd_static_frame_7289463933878" name="google_osd_static_frame" style="display: none; width: 0px; height: 0px;"></iframe>
Any help would be greatly appreciated.
Upvotes: 1
Views: 2348
Reputation: 859
Your integration seems good, but no ad is set up in Google Ad Manager GUI so nothing is shown up.
How to know if your ad integration is good :
I think you need to launch a campaign targeting your inventory to get the ad to show up.
Hope this helps.
Upvotes: 1