Code on only a few pages
Auto ads use the AdSense code pasted on the pages. Google advises pasting this code on all pages of the site, between the head tags.
Implementation guide
Auto ads
You paste a single code and Google decides on its own where to show ads, within the limits you set in the AdSense dashboard.
Understand it in 1 minute
Auto ads are like hiring a decorator for your house. You hand over the key, they look at each room and decide where a picture would look good. In AdSense it works like this: you paste a single code on all pages of the site, and Google analyzes each page and places ads in the spots where they are most likely to work well.
To decide, Google understands the structure of the page, looks at the layout, sees how much content there is and notices whether there are already Google ads there. If you change the site or create new pages, it notices, analyzes again and repositions the ads. The formats come in three families. Intent-based formats, which are ad intents. Overlay formats, which sit on top of the content: anchor ads, pinned to the top or bottom of the screen; vignette ads, full-screen between one page and another, which the person can skip; and side rail ads, on the sides of wide screens. And in-page formats, which go in the middle of the page: banner ads and Multiplex ads.
You stay in control. In the dashboard there are two controls for in-page ads: Maximum number of ads on a page and Minimum distance between ads on a page. Under Excluded areas you mark parts of the page where an in-page ad should not go. Under Excluded pages you stop specific pages of the site from showing auto ads.
Google created Auto ads for people who want to show ads without choosing each position by hand. They adjust on their own to all screen sizes. They are worth it if you have many pages, little time, or want to discover new spaces. But AdSense policies still apply, so check the preview before you apply.
Step by step
Implemented example
<!-- Código do AdSense: vai entre <head> e </head>, em todas as páginas -->
<script async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-0000000000000000"
crossorigin="anonymous"></script>What Google recommends
Tips
Watch out
Auto ads use the AdSense code pasted on the pages. Google advises pasting this code on all pages of the site, between the head tags.
For auto ads, you only need the AdSense code. You do not need to create ad units for them.
Excluding an area only blocks in-page ads. Overlay formats, such as the anchor ad, can still appear.
Yes. Google detects the Google ads that already exist on the page and takes that into account when choosing new positions.
It depends on the layout and content of the page and on the sliders Maximum number of ads on a page and Minimum distance between ads on a page.
In the site's ad settings, use Excluded pages to stop specific pages from showing auto ads. Then click Apply to site.
The new settings can take up to an hour to be applied.
Library
Everything on this page follows Google's official documentation. Read it straight from the source:
The audit reads the site as a visitor would, without clicking anything, and shows what to fix.