How to Make Google Adsense Show in the Middle of Blog Post

People blog for various reasons. If one of your goal as a blogger is to make money online, then correct placement of ads is going to play a very long role for you to become successful. To get the placement that will work for you, experimenting placement of ads on all part of the blog will do: The top, the sides, below post title, below post itself and in the middle of post.

show google ads in the middle of blog post

Read Also : How to Make Google Adsense show below post title
                    How to Make Google Adsense show below post title in Mobile View

For this tutorial, I will be writing on an entirely different one, placement of Google Adsense Ads in the middle of blog post.

How to Make Google Adsense Show in the Middle of Blog Post

1. Log in to your blogger dashboard
2. Navigate to template and backup your blogger template
3. Edit template and search for the below codes (Mostly the second one)

4. Parse your Google Adsense Code using Html Encoder
5. Replace the above code with the below code
<div id='jobmiddlenew'> <data:post.body/>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<style>#addcodemiddle{display: none;}</style>
<div id='addcodemiddle'> 
---- Parsed Google Adsense code----
 <script type='text/javascript'>
var str1=document.getElementById(&quot;jobmiddlenew&quot;).innerHTML;
var str2=str1.length;var str3=str2/2;var substr = str1.substring(str3, str2);
var n =;&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;
<br/>&quot;;var newbody=firsthalf+addcode+secondhalf;

var strnew=document.getElementsByClassName(&quot;post-body entry-content&quot;);
</script>  </b:if>
6. Replace the red bold text with your parsed adsense code
7. Preview and save template.

Try and see if this kind of Google Adsense Placement will work for you. Your view on this will be highly appreciated.

No comments:

Post a Comment