Line items

Traffic anchor ads on web

Serve anchor ads at the top or bottom of your web pages to improve monetization. #anchorads #mobileweb #desktop

You can traffic anchor ads that appear at the top or bottom of your web pages, remaining in view as the user scrolls. Anchor ads allow you to improve the monetization of your web pages, using a high-performing format that is compliant with the Better Ads Standards. Users can collapse an anchor ad at any time by clicking the arrow.

Jump to: Top anchor ads | Bottom anchor ads | Web anchor sizes | Get started

Top anchor ads

A top anchor ad is initially hidden to ensure menus at the top of the page aren’t covered. An anchor ad will appear as the user scrolls. To ensure content isn't covered when the user scrolls to the top of the page, space is reserved at the very top by setting padding-top matching the height of the slot on the body element (please ensure CSS on your site causes the space to be reserved).

Example of a top anchor ad on mobile web
Closed Open
Example of a closed top anchor ad on mobile Example of an open top anchor ad on mobile
Example of a top anchor ad on desktop

Closed

Example of a closed top anchor ad on desktop

Open

Example of an open top anchor ad on desktop

Bottom anchor ads

Bottom anchor ads appear as soon as the ad has been fetched. To ensure content isn't covered when the user scrolls to the bottom of the page, space is reserved at the very bottom by setting padding-bottom matching the height of the slot on the body element (please ensure CSS on your site causes the space to be reserved).

Example of a bottom anchor ad on mobile web
Closed Open
An example of a closed bottom anchor ad on mobile An example of an open bottom anchor ad on mobile
Example of a bottom anchor ad on desktop

Closed

An example of a closed bottom anchor ad on desktop

Open

An example of an open bottom anchor ad on desktop

Web anchor sizes

Inventory type Sizes
Traditional reservations

These reservation sizes are supported:

  • Mobile web: 320x50, 320x100
  • Tablet: 728x90
  • Desktop: 728x90, 980x90, 990x90, 970x90
Programmatic demand

For programmatic:

  • Anchor ads will be sized appropriately for their window.
  • The actual creative size will correlate to the viewport to ensure it doesn’t interfere with the user experience.

Get started

Developer documentationSee details on tagging (including an example of how to control whether an anchor slot will be created on desktop or on mobile), device targeting, and more in the developer documentation.

  1. Tagging
    1. Add the TOP_ANCHOR or BOTTOM_ANCHOR slot type to your web page, ideally within the <head> element.
    2. Display the ad slot as you would any other ad slot.
      defineOutOfPageSlot() may return null if the page doesn’t support the format 
    Tagging tips:
    • Only add anchor slots where you want an ad to be shown. Be aware that anchor ads are not limited to mobile devices. If you serve the same code to both mobile and non-mobile users, it’s recommended to explicitly define when and where anchor ads should be shown for each environment. See an example of how to target by device in the developer documentation.
    • To see what your page would look like with a top or bottom anchor ad, append the hash parameter #gamTopAnchorDemo or #gamBottomAnchorDemo to any page that already loads gpt.js.
  2. Trafficking
    1. Create ad units (or use existing ones) for anchor slots. To streamline trafficking, include the size 320x50.
    2. Create line items:
  3. Reporting
    Use the “Inventory format” dimension to see how anchor ads are performing compared to other formats.
Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Search
Clear search
Close search
Google apps
Main menu
true
Search Help Center
true
true
true
true
true
148