Search code examples
google-dfp

Does multiple sizeMapping work?


I have configured mapping like this:

var mapping = googletag.sizeMapping().
    addSize([972, 0], [750, 100], [728, 90]).
    addSize([752, 0], [728, 90], [468, 60]).build();

I would expect for resolution greater than 972 DFP to choose 750x100 or 728x90 ad. To me it looks like it only considers the first size i.e. 750x100. Even though I have better paying and with higher priority creative of size 728x90. When I get to delivery diagnostics there's information about request and it says "Request sizes 750x100". I would expect to have there both sizes. Am I missing something or in fact those multiple sizes are not supported?


Solution

  • Try

    addSize([972, 0], [[750, 100], [728, 90]]).
    

    Wrap the sizes in an array.