i need display multiple ads on one page with this code:
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<div id="gpt-passback650x250">
<script>
window.googletag = window.googletag || {cmd: []};
googletag.cmd.push(function() {
googletag.defineSlot('/162717810/xxxxx/650x250', [650, 250], 'gpt-
passback650x250').addService(googletag.pubads());
googletag.enableServices();
googletag.display('gpt-passback650x250');
});
</script>
</div>
If i use this code twice or more on page, i get error: Exception in queued GPT command TypeError: Cannot read property 'addService' of null
Code must be same, customer want paste it to page via shortcode in cms. How to solve this? Thanks