Skip to main content
Missed the Live Event? Catch Up Now! Explore the key insights from our CTV Advertising Webinar with the full summary and video replay.
Knowledge Base

Achieve Perfect Ad Placement: Expert Tips on Google Ad Manager Size Mapping

By April 15, 2024July 27th, 2024No Comments
Expert Tips on Google Ad Manager Size Mapping

Objective:  This article demonstrates the use of the ‘sizeMapping()’ function provided by Google Ad Manager (formerly DoubleClick for Publishers). The primary objective of the sizeMapping() function is to achieve optimal ad delivery within a web page which helps with the following:

  • Enhance User Experience: By mapping appropriate ad sizes to different viewport dimensions, size mapping prevents poorly-sized ads that stretch, overlap content, or disrupt the layout. This creates a more visually pleasing and user-friendly experience for website visitors. Utilizing PPID Google Ad Manager helps in better targeting and enhances the overall experience.
  • Maximize Revenue Potential: Delivering well-sized and relevant ads can lead to higher click-through rates (CTRs). Users are more likely to engage with ads that are displayed correctly and don’t detract from the content. This translates to potentially increased ad revenue for publishers. Proper ad delivery and usage of creative tag can significantly boost engagement.

How size mapping works: There are a few different parameters present in the size mapping function as described below:

  • googletag.sizeMapping(): This function creates a size mapping object used to define ad size variations for different screen sizes, ensuring the right tag size is applied.
  • addSize([width, height], [[ad_width, ad_height]]): This method within the size mapping object defines a mapping rule, specifying the ad sizes for particular viewport dimensions. For example, utilizing full page ad size can be effectively managed through this method.
    Here, it specifies:
  • build(): This final method finalizes the size mapping object and makes it ready for use, ensuring that your Google ad manager responsive ads are perfectly tailored to fit various devices

Example of Size Mapping Implementation: 

googletag.defineSlot(‘/path/to/ad/unit‘, [[728, 90], [300, 600], [300, 250]], ‘div-id‘).addService(googletag.pubads());

// Size mapping for different viewports

var mapping = googletag.sizeMapping();

mapping.addSize([1200, 0], [[728, 90]]);  // Large desktops (>= 1200px wide)

mapping.addSize([980, 0], [[300, 600]]);  // Standard desktops (980px – 1199px wide)

mapping.addSize([0, 0], [[300, 250]]);  // Mobile & Tablets (default)

mapping.build();

// Apply size mapping to the ad slot

googletag.display(‘/path/to/ad/unit‘, mapping);

googletag.defineSlot(‘/path/to/ad/unit‘, [[728, 90], [300, 600]], ‘div-id’).addService(googletag.pubads());

Here we have created a sizeMapping object using googletag.sizeMapping(). And three addSize methods define the mapping rules:

  • The first rule targets viewports wider than or equal to 1200px and requests a 728×90 ad size.
  • The second rule targets viewports between 980px and 1199px wide and requests a 300×600 ad size.
  • The third rule acts as a catch-all which targets viewports between 0px and 979px wide and requests a 300×250 ad size.
  • Finally, the build method finalizes the size mapping and the display method associates the mapping with the ad slot.

Benefits of Size Mapping:

  • Improved User Experience: By delivering ads that fit the available space, size mapping prevents ad stretching or overlapping content, leading to a more visually appealing and user-friendly experience. Proper ad delivery using tag size ensures that ads are seamlessly integrated into the content, enhancing overall website aesthetics and functionality.
  • Increased Revenue Potential: Utilizing appropriate ad sizes can lead to higher click-through rates (CTRs) as users are more likely to engage with ads that are well-displayed. Effective size mapping ensures that the ads are relevant and do not detract from the content, thereby maximizing ad revenue. Implementing full page ad size strategically can also contribute to increased user engagement and revenue.
  • Flexibility: Size mapping allows for defining multiple ad size options, catering to various screen sizes and responsive layouts. This flexibility ensures that ads are served optimally across all devices, from desktops to mobile phones, using Google ad manager responsive ads to maintain a consistent and effective ad presence.

In short, the sizeMapping() function is a valuable tool for publishers using Google Ad Manager to deliver optimal ad experiences and potentially maximize their ad revenue.

How can DataBeat help? 

Optimizing ad delivery with effective size mapping strategies can be complex. Databeat’s experienced AdOps team offers comprehensive assistance in this area. From strategic planning to implementation expertise, we help define optimal ad sizes for your target audience and website layout. By leveraging Databeat’s AdOps expertise, you can ensure that your website delivers a seamless user experience while maximizing your ad revenue potential through effective size mapping techniques. Our Google ads management services expertise ensures that your ad strategies are aligned with the latest industry standards, including the use of white-label Google ads management for tailored solutions.

Book a Meeting