How to Install Ads in the Middle-End of Blog Posts / Articles

Installing advertisements in the article, either at the beginning, middle or end of the article is indeed effective enough to optimize PPC ad revenue (Adsense, KlikSaya, Innity, etc.) if compared to installing it in the sidebar. Until now, this method was indeed effective enough to get an increase in income.
How to Install Ads in the Middle-End of Blog Posts

Generally, if you place your advertisement to place your ad in the article, there will be an increase in earnings up to 30-50%, so don't expect that you will get a high earning increase just by placing ads in the article.

Before Continue, Please Parse First Your Adsense Ads
Parse is an activity that formats the ad code into a different format. This is done to prevent clashing an advertisement by coding a blog template.

To parse ads, you can visit the following site

Parse HTML

On this occasion, I will provide some tutorials that you can do to place Google Adsense ads or other advertisements to be placed in articles with different styles and placements.

I will give  installation tutorials on Blogger platforms,  Here's the tutorial:

1. Installing an Ad at the Beginning of the Article (Under the Title)

If you follow the tutorial below, your Adsense ad will appear just below the article title or at the beginning of the article.

Ads placed on the left side

Login to your Blog Dashboard
Select the Template menu -> Edit HTML
Press CTRL + F and search for the code <data: post.body />
Note: There will be more than one code <data: post.body /> , so please try one
Place the code below above <data: post.body />

<div style="float: left;">
Adsense ad code
</div>


Change the Adsense ad code with your Google Adsense ad script that has been parsed (this method supports ads other than Adsense)

Ads Placed on the Right Side

Login to your Blog Dashboard
Select the Template menu -> Edit HTML
Press CTRL + F and search for the code <data: post.body />
Note: There will be more than one code <data: post.body /> , so please try one
Place the code below above <data: post.body />

<div style="float: right;">
Adsense ad code
</div>


Change the Adsense ad code with your Google Adsense ad script that has been parsed (this method supports ads other than Adsense)

Ads Placed in the Middle 

Login to your Blog Dashboard
Select the Template menu -> Edit HTML
Press CTRL + F and search for the code <data: post.body />
Note: There will be more than one code <data: post.body /> , so please try one
Place the code below above <data: post.body />

<div style="text-align: center;">
Adsense ad code
</div>

Change the Adsense ad code with your Google Adsense ad script that has been parsed (this method supports ads other than Adsense)

Ads placed side by side (2 side by side ads, left and right)

Login to your Blog Dashboard
Select the Template menu -> Edit HTML
Press CTRL + F and search for the code <data: post.body />
Note: There will be more than one code <data: post.body /> , so please try one
Place the code below above <data: post.body />

<table border="0">
<tr>
<td>Adsense ad code</td>
<td>Adsense ad code</td>
</tr>
</table>

Change the Adsense ad code with your Google Adsense ad script that has been parsed (this method supports ads other than Adsense)

Read Also: How To Get To Number 1 On Google in 2018

2. Installing Ads in the Middle of Articles (In the Middle of Paragraphs) 

Ads Placed on the Left Side Ads
Not Available

Placed on the Right Side
Not Available 

In the Middle

Login to your Blog Dashboard
Select the Template menu -> Edit HTML
Press CTRL + F and look for the code <data: post.body />
Note: Look for the <data: post.body /> code marked with a conditional tag that shows the post body that will be displayed on the posting page (not on the homepage). For example, as shown below

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<data:post.body/>
</b:if>

Add the code <div id = 'a-centerads'> above it and the code </ div> below it, so that it becomes

<div id='a-centerads'>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<data:post.body/>
</b:if>
</div>

Look for the code </ body> and place the code below above


<b:if cond='data:blog.pageType == &quot;item&quot;'>
<style>
#centerads{display: none;}
</style>
<div id='centerads'>
Adsense ad code</div>
<script type='text/javascript'>
var str1=document.getElementById(&quot;a-iklantengah&quot;).innerHTML;
var str2=str1.length;
var str3=str2/2;
var substr = str1.substring(str3, str2);
var n = substr.search(&quot;&lt;br&gt;&quot;);
if(n&lt;0)
{
n = substr.indexOf(&#39;.&#39;);
if(n&lt;0)
{
n=0;
}
var firsthalf = str1.substring(0, str3+n+1);
var secondhalf = str1.substring(str3+n+1, str2);
}
else
{
var firsthalf = str1.substring(0, str3+n+4);
var secondhalf = str1.substring(str3+n+4, str2);
}
var addcode=&quot
<center>&quot;+document.getElementById(&quot;addcodemiddle&quot;).innerHTML+&quot;</center
<br/>&quot;;
var newbody=firsthalf+addcode+secondhalf;
var strnew=document.getElementsByClassName(&quot;post-body entry-content&quot;);
strnew[0].innerHTML=newbody;
document.getElementById(&quot;addcodemiddle&quot;).innerHTML=&quot;&quot;;
</script>
</b:if>

Change the Adsense ad code with your google ad script that has been parsed
Save

Advertisements Placed Side by Side (2 Side by Side Ads, Left and Right)
Not Available

3. Adverts at the End of Articles (End of Articles / Posts) 

Ads Placed on the Left Side 

Login to your Blog Dashboard
Select the Template menu -> Edit HTML
Press CTRL + F and search for the code <data: post.body />
Note: There will be more than one code <data: post.body /> , so please try one
Place the code below below <data: post.body />

<div style="float: left;">
Adsense ad code
</div>

Change the Adsense ad code with your Google Adsense ad script that has been parsed (this method supports ads other than Adsense)

Ads Placed on the Right Side

Login to your Blog Dashboard
Select the Template menu -> Edit HTML
Press CTRL + F and search for the code <data: post.body />
Note: There will be more than one code <data: post.body /> , so please try one
Place the code below below <data: post.body />

<div style="float: right;">
Adsense ad code
</div>

Change the Adsense ad code with your Google Adsense ad script that has been parsed (this method supports ads other than Adsense)

Ads Placed in the Middle 

Login to your Blog Dashboard
Select the Template menu -> Edit HTML
Press CTRL + F and search for the code <data: post.body />
Note: There will be more than one code <data: post.body /> , so please try one
Place the code below below <data: post.body />

<div style="text-align: center;">
Adsense ad code
</div>

Change the Adsense ad code with your Google Adsense ad script that has been parsed (this method supports ads other than Adsense)

Ads placed side by side (2 side by side ads, left and right)

Select the Template menu -> Edit HTML
Press CTRL + F and search for the code <data: post.body />
Note: There will be more than one code <data: post.body /> , so please try one
Place the code below below <data: post.body />

<table border="0">
<tr><td>Adsense ad code</td>
<td>Adsense ad code</td>
</tr>
</table>

Change the Adsense ad code with your Google Adsense ad script that has been parsed (this method supports ads other than Adsense)

Read Also: Want to Apply Images or Photos to Blog Articles? Follow the following tips

Comments

Popular posts from this blog

7 Functions of VPS You Need to Know

Google Algorithm 2018 and Change Your SEO Strategy

5 Best Battle Royale Games (PUBG) on Smartphones

Increase Blog Traffic By Setting Permalink

How to Create SEO Friendly Blog Post Title

HTML Color Code and How to Use it

The Ideal Way to Get Ideas for Writing

Creating Sub Domains from Custom Domain Blogspot

Comparison of WordPress Advantages With Other Platforms

How to Create Free Website with Weebly