google-dfpgoogle-ad-managergoogle-publisher-tag

Google ad manager ad slot sizes default behavior


Official implementation of gpt defineSlot function, states that ad unit sizes can be defined via array, like this:

googletag.defineSlot('/1234567/sports', [728, 90], 'div-1');

What is the default implementation for this beehavior? Can we define all possible sizes in advance, to be requested from the frontend on each request, but let our admanager team to define sizes on the backend?

The goal is to avoid constant code changes, as our ad unit team works and tests different sizes.

Example. If we put following line in code

googletag.defineSlot('/1234567/sports', [[728, 90],[300,250]], 'div-1');

And our adManager team defines sets for ad unit /sports/ to deliver only 300x250. Will this be valid behavior for google, and will deliver only 300x250 demand, ignoring other requested unit sizes?


Solution

  • The Google Publisher Tag API allows you to define multiple ad sizes for a unique ad placement. Regarding your defined slot sample :

    googletag.defineSlot('/1234567/sports', [[728, 90],[300,250]], 'div-1');
    

    the behavior would be the following :

    1. Google Ad Manager will create a slot where 728x90 and 300x250 are accepted
    2. When the slot is requested, Google Ad Manager will select any activated line item with these sizes
    3. when rendered, the ad placement will display only 728x90 or 300x250 creatives