Skip to main content

Layouts Overview

Control which ad slots load on which pages of your site.


What is a layout?

A layout is a collection of ad slots that load together on specific pages.

Example:

  • Layout nameArticle Pages
  • Scope → Page Paths
    • Starts with: /article/
    • Starts with: /blog/
    • Starts with: /news/
  • Ad Slots
    • article_header
    • article_sidebar_top
    • article_sidebar_bottom
    • article_incontent_1
    • article_incontent_2

When a user visits a URL matching the layout's scope, the listed slots load.


Why use layouts?

Without layoutsWith layouts
Same ads everywhereTailored ads per page type
Can't control slot loadingPrecise control
Hard to test variationsEasy A/B testing
Complex code changesUI-based management

Layout components

ComponentDescriptionExample
NameYour identifierArticle Pages
Scope — Page PathsTyped page-path rules (Exact, Starts with, Contains, Ends with, Regex)Starts with: /article/
Scope — AudienceOptional browser / device narrowingblank = all browsers and devices
Ad SlotsWhich slots loadheader, sidebar, incontent
PriorityOrder of evaluation when multiple layouts could match1 (highest) to 100
Targeting (tab)Optional layout-level key-values passed into GAMsection = sports

How layouts work


Common tasks

TaskLink
View all layoutsViewing layouts →
Create a layoutCreating a layout →
Add slots to layoutAdding slots →
Configure targetingLayout targeting →
Set prioritiesLayout priorities →

Layout examples

News/Media site

LayoutPage-path rulesSlots
HomepageExact: /header, sidebar, below_fold
ArticleStarts with: /article/, Starts with: /story/header, sidebar, incontent × 3
CategoryStarts with: /category/header, sidebar
VideoStarts with: /video/header, sidebar (fewer slots)
DefaultRegex: .*header (fallback)

E-commerce site

LayoutPage-path rulesSlots
HomepageExact: /billboard, sidebar
CategoryStarts with: /category/header, sidebar
ProductStarts with: /product/sidebar_only (minimal)
BlogStarts with: /blog/header, incontent

Best practices

Do

  • Name layouts clearly (Article Pages not Layout 1)
  • Set specific targeting before generic
  • Use priorities to control matching order
  • Create a Default fallback layout

Don't

  • Create overlapping targeting without priorities
  • Forget to include slots in layouts
  • Leave pages unmatched (no ads will load)

Getting started