Ad Tags

Ad Tags are a snippet of javascript (JS) code generated by your Adserver that is placed on your website to show winning creatives that are uploaded onto your Adserver. They communicate first to your adserver to let it know that a user is arriving on the page by generating an ad request that your adserver will respond to in the form of an actual advertisement.  There are a lot of variables that can be added to these tags to execute certain behaviors, but the key components of any ad tag are the ad tag/ad unit name, div identifier as well as the ad size(s) that can be displayed. 

A proper Ad Tag setup reduces issues with

  1. Site Latency

  2. JS console errors

  3. Development resources

Best Practices

Single Request Architecture (SRA)

Each ad tag on your site needs to make an ad request in order to generate a creative. When you have multiple ads in different areas of your site these ad requests can add up leading to the latency of your ad requests and ad rendering time. To combat this you can enable SRA in your header tag in order to consolidate the ad requests into one single request. If you are using Google AdManager this setup comes as default. 

Asynchronous Rendering 

Allows your ad tags to load independently of your website's content. This will reduce any risk of a potential ad loading error impacting users from seeing your content. 

Responsive Ad Tags

A way to ensure your ads are always sized to fit the screen of your users without conflicting with the content on your site and negatively affecting the user experience is to set up responsive ads on your site. Some publishers create specific mobile ad tags for their mobile pages and while this is definitely one way to tackle this issue, it requires more development on your site which can always impact site latency.

An efficient and effective way to make your mobile ads responsive is to include size-mapping rules to your ads within the source code. This will allow you to set the rules one time and give you peace of mind that your ads will always render correctly no matter the screen size.

Collapsing Blank Ads

Sometimes ad requests go unfilled, whether due to a technical error or to an advertiser not responding to a particular ad request. When this happens you want to be sure that the lack of an ad creative does not distort your page layout. A helpful way to do this is to include the functionality that will collapse these empty ad slots. The yieldPass MLK solution comes with this built-in. (Learn More)