Placing Adsense in-feed ads within Blogger posts can be a bit tricky, but fear not! This article will guide you step by step on how to implement it with clear coding instructions. The performance of in-feed ads can be quite good, but it largely depends on the ads’ implementation and the speed of your template.
Conditions for Implementing In-Feed Ads in Blogger Posts:
- Do not place this ad in the blog posts
- Do not place this ad in sidebars
- Do not place this ad in the footer
- Place this ad in the blog feed
- Do not float the ad
Steps to Place In-Feed Ads in Blogger Posts:
-
Create In-Feed Ad on Adsense:
- Log into your Adsense account and create an in-feed ad.
- Copy the in-feed ad codes from your Adsense dashboard.
-
Parse the Ad Codes:
- Paste the copied ad codes into an Adsense Converter to parse them.
-
Edit Blogger Theme:
- Go to your Blogger dashboard and click on “Edit Theme” to view the HTML codes of your template.
-
Find the Appropriate Location:
- Inside the HTML editor, press
Ctrl+F
to bring up the search box. - Search for
<b:loop values='data:posts' var='post'>
and press enter to locate the result. - Choose the item within the Blog Feed section.
- Inside the HTML editor, press
-
Modify the Code:
- Replace
<b:loop values='data:posts' var='post'>
with<b:loop values='data:posts' var='post' index='x'>
or<b:loop values='data:posts' var='post' index='x'>
before the left arrow.
- Replace
-
Insert Ad Placement Codes:
-
Place the following codes after
<div class='post-outer'>
:html<b:if cond='data:blog.pageType != "static_page" and data:blog.pageType != "item"'>
<b:if cond='data:x==1'>
<div class='post'>
<!-- FEED-AD CODE -->
</div>
</b:if>
<b:if cond='data:x==3'>
<div class='post'>
<!-- FEED-AD CODE -->
</div>
</b:if>
</b:if>
- Replace
1
with2
,3
,4
, or any number depending on where you want the feed ad to appear between, such as the top or bottom of your homepage feed. - Replace
"FEED-AD CODE"
with your parsed feed ad code.
-
-
Save and Test:
- Save your HTML changes.
- Everything should work smoothly just like charm!
Now your in-feed Adsense ads should be successfully placed within your Blogger posts, optimizing ad visibility without compromising user experience.