Adding Ad Tags to your SmartFormat Feed using Google Ad Manager

Please use the following instructions when inserting ad tags from Google Ad Manager into your feed. The ad inventory that is served using this tag will run at the bottom of your SmartView page. In our experience, the 300x250 ad unit performs the best.

 

Step One:

In Google Ad Manager, navigate to Ad Units within the Inventory section on the left rail.

Screen_Shot_2022-05-10_at_4.51.07_PM.png

Step Two:

Click in to the hierarchy to find the ad unit you would like to create an ad tag for and click its name to see details. Then click the Tags tab.

Screen_Shot_2022-05-10_at_4.52.17_PM.png

Step Three:

In the Tag Type drop-down, select Google Publisher Tag.

Screen_Shot_2022-05-10_at_4.53.15_PM.png

 

Step Four:

For Tag options, make the appropriate selections for your network and click continue. In most cases the defaults will work fine.

 

Step Five:

On the Tag results page, copy out the Document Header and Document Body code blocks. Both code snippets are needed or ads will not be served.

 

DOCUMENT HEADER

<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('/NETWORK_ID/LEVEL-1/LEVEL-2/...', [300, 250], 'div-gpt-ad-xxxxxxxxxxxxx-0').addService(googletag.pubads());
googletag.enableServices();
});
</script>

DOCUMENT BODY

<!-- /NETWORK_ID/LEVEL-1/LEVEL-2/... -->
<div id='div-gpt-ad-xxxxxxxxxxxxx-0'>
  <script>
    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1652364587178-0'); });
  </script>
</div>

 

Step Six:

Copy both the Header and Body code blocks and use that for your SmartFormat feed. Be sure to add the CDATA enclosures so that this code is interpreted properly.

This is what the code snippet above should look like inside the <snf:adcontent> element on your feed:

<snf:advertisement>
<snf:adcontent>
<![CDATA[ <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('/NETWORK_ID/LEVEL-1/LEVEL-2/...', [300, 250], 'div-gpt-ad-xxxxxxxxxxxxx-0').addService(googletag.pubads()); googletag.enableServices(); }); </script>
<!-- /NETWORK_ID/LEVEL-1/LEVEL-2/... --> <div id='div-gpt-ad-xxxxxxxxxxxxx-0'> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-xxxxxxxxxxxxx-0'); }); </script> </div> ]]>
</snf:adcontent>
</snf:advertisement>