Code outside the list
Pasting the in-feed outside the feed can lead to poor performance and may go against policies. It must sit between the items, at the start or at the end of the list.
Implementation guide
In-feed ads
A native ad that slips into the middle of a list of articles or products, looking just like the items in the list.
Understand it in 1 minute
The in-feed ad is an ad that joins the line. Think of a shop window with several products side by side. In the middle of them appears a product from another shop, arranged the same way. This is what the in-feed does on the site. It appears in the middle of a repeating list, called a feed, such as the latest news list on the home page or a shop's product list.
Heads up: here, feed has nothing to do with RSS. For Google, a feed is a sequence of similar blocks that the person scrolls through. It can be a list of articles or news, a list of products or services, or even a text-only list. The ad can go between the items, at the start or at the end of the list.
It is native, which means you make the ad look like the items in the list. When creating it, AdSense can look at your page and suggest a style on its own, or you can build the style by hand, choosing the layout most similar to your list. The code AdSense gives you at the end has a layout key, so copy and paste the code exactly as it was generated. The ad width is always the same as the list and must be at least 250 pixels. AdSense adjusts the height on its own.
Google created the in-feed to open a new ad space inside lists, without bothering people who are scrolling the page. It works well on mobile, where space is small. It is worth it if your site has a home page with a list of posts, category pages or product lists. Google recommends leaving at least three content items between one ad and another.
Step by step
Implemented example
<script async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-0000000000000000"
crossorigin="anonymous"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-format="fluid"
data-ad-layout-key="xxxxxxxx"
data-ad-client="ca-pub-0000000000000000"
data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>What Google recommends
Tips
Watch out
Pasting the in-feed outside the feed can lead to poor performance and may go against policies. It must sit between the items, at the start or at the end of the list.
If the box has no defined width, as in a floating element, the ad does not appear.
A box with a fixed height can distort the ad. Leave the height variable.
The in-feed is not for RSS feeds. It goes in the lists that appear inside the site's pages.
As many as you like, along with other ad types, as long as the ads do not outweigh the content. In the same list, Google recommends at least three content items between one ad and another.
No. For the in-feed, a feed is a list of similar blocks inside the page, such as articles or products.
The in-feed is responsive, but if the list style changes between mobile and desktop, create a separate in-feed for each screen size.
Because the option to allow display ads is turned on. This can help you earn more, and you can turn it off under Global options.
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.