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 name —
Article 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 layouts | With layouts |
|---|
| Same ads everywhere | Tailored ads per page type |
| Can't control slot loading | Precise control |
| Hard to test variations | Easy A/B testing |
| Complex code changes | UI-based management |
Layout components
| Component | Description | Example |
|---|
| Name | Your identifier | Article Pages |
| Scope — Page Paths | Typed page-path rules (Exact, Starts with, Contains, Ends with, Regex) | Starts with: /article/ |
| Scope — Audience | Optional browser / device narrowing | blank = all browsers and devices |
| Ad Slots | Which slots load | header, sidebar, incontent |
| Priority | Order of evaluation when multiple layouts could match | 1 (highest) to 100 |
| Targeting (tab) | Optional layout-level key-values passed into GAM | section = sports |
How layouts work
Common tasks
Layout examples
| Layout | Page-path rules | Slots |
|---|
| Homepage | Exact: / | header, sidebar, below_fold |
| Article | Starts with: /article/, Starts with: /story/ | header, sidebar, incontent × 3 |
| Category | Starts with: /category/ | header, sidebar |
| Video | Starts with: /video/ | header, sidebar (fewer slots) |
| Default | Regex: .* | header (fallback) |
E-commerce site
| Layout | Page-path rules | Slots |
|---|
| Homepage | Exact: / | billboard, sidebar |
| Category | Starts with: /category/ | header, sidebar |
| Product | Starts with: /product/ | sidebar_only (minimal) |
| Blog | Starts with: /blog/ | header, incontent |
Best practices
- 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