Ad manager - sizeMapping()

0 votes
326 views
added May 8, 2019 in Javascript by LC Marshal Captain (25,790 points)
//big leaderboard
    var mappingBigleaderboard = googletag.sizeMapping().
      // addSize([1440, 0], [970, 250]). //desktop  
      addSize([1440, 0], [970, 250]). //desktop
      addSize([1366, 0], [970, 250]). //desktop
      addSize([1280, 0], [970, 250]). //desktop
      addSize([1024, 0], [970, 250]). //desktop 
      addSize([768, 0], [728, 188]). //desktop   
      addSize([500, 0], [425, 110]). //phone 
      addSize([0, 0], [320, 82]). //phone 
      build();
      
      
//STAGING BIG LEADERBOARD
    window.StagingBigLeaderboardSlot = googletag.defineSlot('/1818xxxxx/Staging_BigLeaderboard_Home', [[425, 110], [970, 250], [728, 188], [320, 82]], 'div-gpt-ad-1550809079911-0').defineSizeMapping(mappingBigleaderboard).addService(googletag.pubads());
    
    
googletag.pubads().enableSingleRequest();
googletag.pubads().enableAsyncRendering();
googletag.pubads().collapseEmptyDivs();
googletag.enableServices();

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...