How to Install Google AdSense In-Feed Ads
After a period of infrequent updates to this blog, Arlina Code will share how to install the newest Google AdSense feature: the In-Feed Ads ad unit, which you can install on your blog. This ad unit is quite interesting because it will be placed between the list of articles, following a customizable post layout.
If you want to add this feature, follow these simple steps.
How to Install Google AdSense In-Feed Ads
First, open your Google AdSense dashboard. Click the My Ads menu > Content > Ad units > Then click the New Ad Unit button.
Next, select in-feed ads
In the next step, please select one of the display types according to your blog.
After selecting one of the display types, in the next step you need to adjust the appearance of the ad unit.
After completing the ad display settings, click the SAVE AND GET CODE button.
Next step, open the Blogger dashboard > Theme > Click the Edit HTML button > Look for the code below
<b:loop values='data:posts' var='post'>
Add index='x' inside it looks like this
<b:loop values='data:posts' var='post' index='x'>
Note:
Add index='x' only in the code <b:loop values='data:posts' var='post'> which is in this code
<b:includable id='main' var='top'>...</b:includable>
Next, find this code
<div class='post-outer'>
Add the code below right below the code in the step above.
<b:if cond='data:blog.pageType != "static_page" and data:blog.pageType != "item"'>
<b:if cond='data:x==1'>
<div class='post'>
YOUR CODE SCRIPT NATIVE ADS
</div>
</b:if>
<b:if cond='data:x==3'>
<div class='post'>
YOUR CODE SCRIPT NATIVE ADS
</div>
</b:if>
</b:if>
Then the result will be like this
<div class='post-outer'>...</div>
<b:if cond='data:blog.pageType != "static_page" and data:blog.pageType != "item"'>
<b:if cond='data:x==1'>
<div class='post'>
YOUR CODE SCRIPT NATIVE ADS
</div>
</b:if>
<b:if cond='data:x==3'>
<div class='post'>
YOUR CODE SCRIPT NATIVE ADS
</div>
</b:if>
</b:if>
Replace YOUR CODE SCRIPT NATIVE ADS with the In-Feed Ads code, save the template.





Post a Comment