In-article, In-feed and Multiplex ads: where each native AdSense format belongs and how to place the code
Key takeaways
- AdSense has three native ad unit types: In-article ads between paragraphs, In-feed ads inside lists of content, and Multiplex ads that show several ads in a grid.
- Google suggests placing In-article code two paragraphs below the start of the article and leaving sufficient content between several In-article ads.
- In-feed code must go inside the feed, usually through a counter in the template loop, in a parent with a valid width of at least 250px and a variable height.
- Multiplex units are often placed at the end of articles or in sidebars; custom sizes cannot exceed 1200px and only one dimension can exceed 600px.
- Multiplex layout parameters such as data-matched-content-ui-type still work but Google marks them as deprecated.

AdSense offers three native ad unit types for manual placement. In-article ads sit between paragraphs of one article, In-feed ads sit between items of a list or grid, and Multiplex ads show several ads in a grid, usually after the article or in a sidebar. Each has its own generated code and its own placement rules, and pasting one where another belongs hurts performance and can break policy.
Which format goes where?
| Format | Where it goes | Code signature | Sizing |
|---|---|---|---|
| In-article | Between paragraphs of a single article | data-ad-layout="in-article", data-ad-format="fluid" |
Width of the parent, full width on phones in portrait, height set by AdSense |
| In-feed | Between items of a list, grid or feed | data-ad-format="fluid" |
Parent width, minimum 250px |
| Multiplex | End of article, sidebar | data-ad-format="autorelaxed" |
Responsive or custom size within limits |
All three are created on the Ads page under By ad unit. The Ad formats FAQ lists them as Google’s native products and adds: “As long as your ads don’t exceed your content, you can place as many native and non-native ads on your pages as you want.”
If you would rather let Google place native ads for you, Auto ads can insert Multiplex ads as an in-page format; see Auto ads vs manual ad units.
How do I set up In-article ads?
Google’s Create an In-article ad unit steps:
- Click Ads > By ad unit > In-article ads.
- Name the unit. Google recommends a prefix such as “Native” to track the units in reports.
- Style it to match your content and check the preview at several container widths.
- Click Save and get code and paste it into the article HTML.
On placement, Google writes: “We suggest that your place the code two paragraphs below the start of the article.” With several units on one page, “allow sufficient content between ads to minimize disruption to your readers.”
The code, from Google’s full-width layout article, with placeholders:
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-0000000000000000"
data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
In-article ads are responsive by default. On desktop and other configurations, the width equals the parent container’s width, with a minimum of 250px, and AdSense sets the height. On phones in portrait mode, they expand to the full screen width. Google says its experiments show that full-width layout performs better there; to turn it off, add data-full-width-responsive="false" to the <ins>, knowing “you may decrease your potential earnings”.
Inserting In-article ads automatically
In Markdown-based sites you rarely want to paste code into each post. Insert it at render time instead:
- WordPress: a
the_contentfilter that inserts after the second paragraph, shown in AdSense in WordPress without a plugin. - Hugo and Eleventy: a shortcode authors place in the text, shown in AdSense in Hugo and Eleventy.
Whatever the method, skip short articles. An ad two paragraphs in followed by a third paragraph and a footer leaves the page mostly ads.
How do I place In-feed ads?
A feed, per Google’s What is a feed?, is “a stream of content that you can scroll through” made of similar-looking blocks: a homepage list of articles, product results, a horizontal feed or a text-only list. It does not mean an RSS feed. Google adds that “the width of your feed must be greater than 250 pixels to show In-feed ads”.
Google’s placement article is clear on the location: “Be sure to place your In-feed ad code inside your feed. Placing your In-feed ad code outside your feed could result in poor ad performance and could cause you to violate AdSense policies.”
The method is a counter in your template loop. Google gives pseudo code; here is the same idea in a Nunjucks template, inserting after every third item:
<ul class="post-list">
{% for post in posts %}
<li class="post-card">
<a href="{{ post.url }}"><h3>{{ post.title }}</h3></a>
<p>{{ post.excerpt }}</p>
</li>
{% if loop.index % 3 == 0 and not loop.last %}
<li class="post-card post-card--ad">
<ins class="adsbygoogle"
style="display:block"
data-ad-format="fluid"
data-ad-client="ca-pub-0000000000000000"
data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</li>
{% endif %}
{% endfor %}
</ul>
Copy the <ins> from the code AdSense generates for your unit, with every attribute it contains; the styling you chose in the editor is tied to the unit. Two container rules from Google:
- A valid width. A parent without an explicit width, such as a floating element, means “your ads won’t show”. The minimum is 250px.
- A variable height. A fixed-height parent “might” distort the ads.
You can reuse the same In-feed unit several times in one feed or create separate units, for example one for a mobile list layout and one for a desktop grid.
How do I set up Multiplex ads?
Google’s About Multiplex ads describes them as “a type of native ad format that serve multiple ads in a grid”, often placed “at the end of articles or in sidebars” to monetize readers who have finished the content.
To create one (Create a Multiplex ad unit): Ads > By ad unit > Multiplex ads, name it, choose a size, adjust colors and fonts, click Create and paste the code. Google’s size notes:
- A responsive layout is recommended.
- For a custom size, aim for a width-to-height ratio around 2:1 (horizontal) or 1:2 (vertical). Traditional banner sizes such as 728x90 are not recommended.
- Neither dimension can exceed 1200 pixels, and only one can be greater than 600 pixels.
To report on them, Google suggests an Ad units report with the “Requested format” breakdown.
Customizing the Multiplex grid
Google’s customization article documents extra parameters on responsive Multiplex units: data-matched-content-ui-type (layout, such as image_stacked or image_sidebyside), data-matched-content-rows-num and data-matched-content-columns-num. All of them are required together, and two comma-separated values set mobile and desktop separately. Google lists these as acceptable modifications, but adds a warning: “These options are deprecated.” They still work, without a guarantee for the future.
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-0000000000000000"
data-ad-slot="1234567890"
data-matched-content-ui-type="image_stacked"
data-matched-content-rows-num="3"
data-matched-content-columns-num="1"
data-ad-format="autorelaxed"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
If you can live with the default responsive grid, leave these parameters out and avoid depending on a deprecated feature.
How do I compare the three formats in reports?
Google documents a slightly different path for each:
| Format | Report path from Google’s articles |
|---|---|
| In-article | Reports > Ad units report > select your In-article units > Filter |
| Multiplex (manual units) | Reports > “Ad units” report with the “Requested format” breakdown |
| Multiplex (Auto ads) | Reports > custom report > filter Ad format > In-page |
Two habits make these reports usable. Name units by format and position, for example “Native in-article 1” or “Native feed home”, as Google suggests with its “Native” prefix. And create a separate unit per position instead of reusing one unit everywhere, so a weak placement does not hide behind a strong one. Compare page RPM before and after adding a native unit, not only the unit’s own earnings, since a new unit can shift earnings between units on the same page.
Common mistakes
- In-feed code in an article body. Google says In-feed code outside a feed can cause poor performance and policy problems. Use In-article between paragraphs.
- Native ads that look like your own content links. Native styling should match your site, but the ad placement policies do not allow implementing ads “in a manner that disguises the ads”, or placing them under misleading headings such as “resources” or “helpful links”.
- More ad than article. A short post with an In-article unit, an In-feed block and a Multiplex grid can tip into valuable inventory problems.
- Fixed-height wrappers. Native formats set their own height. Reserve space with
min-height, notheight. - Floats and zero-width parents. The minimum width is 250px for In-article and In-feed. Check narrow sidebars and grid cells on mobile.
- Pasting
fluidinto a display unit. The value belongs to the native unit it was generated for; display units useautoor a shape such ashorizontal.
Frequently asked questions
What is the difference between In-article and In-feed ads?
In-article ads go between the paragraphs of a single article and adapt to the width of the text column. In-feed ads go between items of a list, such as article cards on a homepage or products in a category, and are styled to match those items. Use In-article on content pages and In-feed on listing pages; Google warns that In-feed code placed outside a feed can hurt performance and break policy.
How many In-article ads can I put on a page?
Google does not set a fixed number. Its instructions say that if you place more than one In-article ad, you should allow sufficient content between the ads to minimize disruption to readers. The Ad formats FAQ adds that you can place as many native and non-native ads as you want as long as your ads do not exceed your content.
Can I stop In-article ads from going full width on mobile?
Yes. Google's Full-width In-article layout article shows the In-article code with data-full-width-responsive set to false, which stops the automatic expansion on phones in portrait mode. Google notes that its experiments show full-width In-article ads perform better on mobile, so disabling it may decrease your potential earnings.
Can I change the number of rows and columns in a Multiplex unit?
Yes, on responsive Multiplex units. Google documents data-matched-content-ui-type, data-matched-content-rows-num and data-matched-content-columns-num, which must be used together and can take separate mobile and desktop values. Google lists them as acceptable code modifications, but also marks them as deprecated and does not guarantee that they will keep working in all circumstances.
Sources
- Create an In-article ad unit · Google AdSense Help
- Full-width In-article layout · Google AdSense Help
- How to place In-feed ad code on your page · Google AdSense Help
- Create a Multiplex ad unit · Google AdSense Help
- How to customize your responsive Multiplex ad unit · Google AdSense Help
- Ad formats FAQ · Google AdSense Help
Related guides
- Responsive AdSense ad units: data-ad-format, full-width mobile ads and CSS sizing
How responsive AdSense display units size themselves, what data-ad-format and data-full-width-responsive do, and the CSS media query changes Google allows.
- Auto ads vs manual ad units: which one to use, and how to combine them
Auto ads or manual ad units? Compare control, formats, page and area exclusions, and how AdSense combines both on one page without double work.
- How to add AdSense to Hugo and Eleventy sites with partials and shortcodes
Add AdSense to Hugo or Eleventy: a head partial, an ad unit shortcode for Markdown, production-only loading and ads.txt copied to the site root.
- AdSense ad placement policies: labels, accidental clicks, navigation, pop-ups and floating ads
The AdSense ad placement rules in one place: allowed ad labels, encouraging clicks, ads near navigation, floating boxes, pop-ups, refresh and overlap, with fixes.
- "Valuable inventory: No content" and ads on screens without publisher content: causes and fixes
Why AdSense flags "Google-served ads on screens without publisher-content" (the no content issue), which pages trigger it, and how to fix it before a review.