Place Ads in the Middle of Blogger Articles (Posts)
English French German Spain Italian Dutch Russian Portuguese Japanese Korean Arabic Chinese Simplified

Place Ads in the Middle of Blogger Articles (Posts)

Place Ads in the Middle of Blogger Articles (Posts)

Placing ads in the middle of articles is one of the popular strategies for bloggers to increase revenue from Google AdSense or other ad networks. Ads placed in the middle of articles are often more effective because they are in between the content that visitors are reading, so visibility and the possibility of clicks are higher. This article will explain how to place ads in the middle of Blogger articles with easy steps.

Why Place Ads in the Middle of Articles?

There are several reasons why placing ads in the middle of articles is very effective:


Increased Visibility: When visitors are reading an article, their attention is focused on the content on the screen. By placing ads in the middle of the article, they are more likely to see the ads.


Higher Click Rates: Ads placed between paragraphs tend to generate more clicks compared to ads in the sidebar or bottom of the page, where visitors usually pay less attention.


Better User Experience: When placed correctly, ads in the middle of articles will not distract readers. Instead, they can blend in with the content and provide additional revenue opportunities without ruining the aesthetics of the blog.


How to Place Ads in the Middle of Articles on Blogger

Here are simple steps to place ads in the middle of articles on the Blogger platform:


Log in to Your Blogger Account

The first step is to log in to your Blogger account and select the blog where you want to place ads in the middle of the article.


Open HTML Template

Once logged in, select "Theme" in the left menu, then click the "Edit HTML" button. Here you will access your blog's HTML code, which will be used to place ads in the middle of the article.


Find the Code for Blog Posts

Inside the HTML editor, find the code responsible for displaying blog posts. Usually, this is marked with a tag like:


<div class='post-body entry-content'>

If you don't find this tag, you can search for keywords like entry-content or post-body by using the CTRL + F feature on your keyboard.


Add Ad Code in the Middle of the Article

After finding the right location, you can add the AdSense ad code (or other ad networks) in the middle of the article. To place ads between paragraphs, you can use an automated script that divides the article into sections and inserts ads between them.


For example, here is an example of how to insert ad code between paragraphs with simple JavaScript:

<script>

var paragraphs = document.getElementsByClassName('post-body')[0].getElementsByTagName('p');

var adCode = 'YOUR ADSENSE AD CODE';

var adPosition = Math.floor(paragraphs.length / 2);

paragraphs[adPosition].insertAdjacentHTML('afterend', adCode);

</script>

In the script above, ads will appear after the middle paragraph in each post. Don't forget to replace YOUR ADSENSE AD CODE with the original ad code from your AdSense account.


Save Changes

When you're done adding the code, click the "Save Theme" button to apply the changes to your blog. Check the results by opening one of the posts to see if the ad is already appearing in the desired position.


Effective Ad Placement Tips

Consider Article Length: Make sure your article has enough content before placing ads in the middle. If the article is too short, placing ads in the middle can disrupt the reader's experience.


Don't Overdo It: Avoid placing too many ads in one article. Google AdSense also has a policy about the number of ads allowed on each page, so make sure you follow this rule to avoid penalties.


Use Responsive Ads: Responsive ads adjust their size and appearance based on the visitor's device (desktop, tablet, or phone), providing a better user experience.


Further how to Install Google AdSense Ads in the Middle of Articles (Posts) on Blogger Blogs is very easy. We just need to change the second or third <data:post.body/> code in the blog template.


How to Install Ads in the Middle of Articles (Posts) on Blogger

1. Theme > Edit HTML

2. Find (Ctrl+F) the second or third <data:post.body/> code. Usually the second one.

3. Replace the code with this code


<div expr:id='&quot;post1&quot; + data:post.id'/>

<div class='googlepublisherads' style='margin:20px 0'>

<center>

<!-- Parse Result Ad Code Here --></center>

</div>

<div expr:id='&quot;post2&quot; + data:post.id'><data:post.body/></div> <script type='text/javascript'> var obj0=document.getElementById(&quot;post1<data:post.id/>&quot;);

var obj1=document.getElementById(&quot;post2<data:post.id/>&quot;);

var s=obj1.innerHTML;

var t=s.substr(0,s.length/2);

var r=t.lastIndexOf(&quot;&lt;br&gt;&quot;);

if(r&gt;0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+4);} </script> 4. Parse the AdSense Code in HTML Parser 5. Copy the red text above.

6. Save!


Note: Modification


The ad script in the middle of the article that has been installed earlier, will place the ad right in the middle of the post, because the script divides the writing into two parts -- namely the code line var t = s.substr (0, s.length / 2);).


We can change it to the number 3,4,5 etc. to divide the writing into 3,4,5 etc. so that the ad will appear in the 1/3, 1/4, 1/5 section of the article.


We just need to change the code in the line var t = s.substr (0, s.length / 2); and the two lines below it, with the code:


var r = s.search (/x3C!– adsense –x3E/igm);

if (r>0) {obj0.innerHTML = s.substr (0, r); obj1.innerHTML=s.substr(r+16);}


So the whole thing will look like this:


<div expr:id='"ads1" + data:post.id'></div>

<div style="clear:both; margin:10px 0">

<!-- ADSENSE ADS HERE -->

</div>

<div expr:id='"ads2" + data:post.id'><data:post.body/></div>

<script type="text/javascript">

var obj0=document.getElementById("ads1<data:post.id/>");

var obj1=document.getElementById("ads2<data:post.id/>");

var s=obj1.innerHTML;

var r=s.search(/x3C!-- adsense --x3E/igm);

if(r>0) {obj0.innerHTML=s.substr(0,r);

obj1.innerHTML=s.substr(r+16);}

</script>


Placing Ads Under Title/Post

If you want to place ads under the title and under the post, simply save the ad code above and below the second or third <data:post.body/> code.

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel