How To Insert Adsense Ads In The Middle Of Your Blogger Blog Post - Easy Steps. i know most of us would like to add adsense ads in the middle of blog post on blogger blog but have not gotten a simple and effective trick on how to do that. i have been trying to add adsense code in the middle of my blog post on blogger blog but keep getting error on multiple display of same contents in the middle of the blogger blog post. due to this, i had to keep searching for simple and effective trick to get it done and finally i found a way out. this trick is not difficult to implement. all you need is to do a little editing of your blogger blog html template. its not advance so don't worry if you are not a web expert. if you have been trying to do this, here is
How To Insert Adsense Ad In The Middle Of Your Blogger Blog Post
implementing this trick on my blogger blog is really awesome as i have seen increased on my google adsense earnings since the ads is displayed in the middle of the blog post on blogger/blogspot blog. this way, readers tends to click on it since it blends with the post write up. it increases your CTR since the readers will see the ads as they read through the post write up. this trick uses paragraph/break on your blog post. so it all depends how many paragraph you will want it to display, it could be after the second paragraph, third or forth paragraph. it all depends on your choice of placement. so follow this steps below on
How To Insert Adsense Ad In The Middle Of Your Blogger Blog Post
How To Insert Adsense Ads In The Middle Of Your Blog Post On Blogger/Blogspot
find the following code using the control F key on your keyboad
1. Log into your blogger blog and select the blog you want to
Insert Adsense Ads In The Middle Of The Blogger Blog Post
from the blog dashboard, scroll to Theme and select it. Click on HTML from the template option to edit the blogger HTML Template
2. from the html template. insert your cursor inside the template and use the Find key by pressing
CTRL F (Control F). search for the code below
<data:post.body/>
Take Note: You will see multiple occurrences of
<data:post.body/> inside the template so you need to test each of them to see which one would work. In most cases, the second one or the the last one is usually the one that works. So try them on error and trial
3. When you searched for the code above, replace it with the below DIV code
<div id='adsense-target'><data:post.body/></div>
4. Now create a new
adsense code or use the one you have already created. Copy the AdSense ad code that you want to display and use this tool to convert it into parsed code.
Adsense Parse Html Online Tool
After conversion, add the following HTML and replace the word in quote"
ADSENSE CODE HERE" with the converted ad sense parsed code just before the line of code we added in the template.
<b:if cond='data:blog.pageType == "item"'> <div id='adsense-content' style="display:block;text-align: center"> ADSENSE CODE HERE </div></b:if>
Take Note : By default, the
Google AdSense ad unit will be displayed in the middle and align to the center just after the first paragraph. If you are not ok with the position and want to wrap text around the ad, you can make use of one of the options below:
a) if you wish to Align AdSense on the left - then change
<div id='adsense-content' style="display:block;text- align: center"> to this one below
<div id='adsense-content' style="display: inline- block;float: left;margin:15px 15px 15px 0px">
b) If You wish to make the ad display at the right side in the middle of post, you will have Align it on the right of the post. To do this, change
<div id='adsense-content' style="display:block;text-align: center">
with this code below
<div id='adsense-content' style="display:inline- block;float:right;margin:15px 0px 15px 15px">
we are not done yet.
5. Lastly, right after the code
<div id='adsense- target'><data:post.body/></div> from the step 2,
add this script below
<script type='text/javascript'> function insertAfter(addition,target) { var parent = target.parentNode; if (parent.lastChild == target) { parent.appendChild(addition); } else { parent.insertBefore(addition,target.nextSibling); } } var adscont = document.getElementById ("adsense-content"); var target = document.getElementById ("adsense-target"); var linebreak = target.getElementsByTagName ("br"); if (linebreak.length > 0){ insertAfter(adscont,linebreak[0]); } </script>
Take Note: To make the adsense ads display after the second paragraph in your post, then , change "0" from the line in red above with "2". - just keep changing the number to any that suit you if you wish to make it display in the paragraph of your choice
if everything is done correctly, the code combination becomes
<div id='adsense-content' style='display:block;text-align: center'>ADSENSE CODE HERE
</div></b:if>
<div id='adsense-target'><data:post.body/></div>
<script type='text/javascript'>
function insertAfter(addition,target) {
var parent = target.parentNode;
if (parent.lastChild == target) {
parent.appendChild(addition);
} else {
parent.insertBefore(addition,target.nextSibling);
}
}
var adscont = document.getElementById("adsense-content");
var target = document.getElementById("adsense-target");
var linebreak = target.getElementsByTagName("br");
if (linebreak.length > 0){
insertAfter(adscont,linebreak[6]);
}
</script>
if you inserted it properly, adsense ads should display in the middle of the post. Here is a tip. Before adding your adsense code in the position where you see the word
"ADD ADSENSE HERE". Just leave it like that without replacing it with your adsense code. Visit your blog, click on any post, Then use the Control F on your keyboard to find the word ADD ADSENSE HERE to see if you will see it. This way, you don't have to confuse yourself with adsense parsed code because after parsing it, it gives you a different code which might be confusing if you don't understand it. So with this trick, you can easily spot the main <data:post.body/> since it appears in different part in your template.
So when you find the ADD ADSENSE HERE in your blog post and did not see it, that means that particular <data:post.body/> is not the right one. If so, then you search for the next until you finally find the right one.
visit
www.gurubest.com to view the latest post update you are not seeing right now.
more articles update is posted on
gurubest every day,so don't be the last to get update to your email.
Subscribe by email
DON'T FORGET TO SHARE WITH YOUR FRIENDS ON FACEBOOK BY CLICKING THE SHARE BUTTON.
Nice write up, thank you
ReplyDeleteThanks for this, it worked for me on my blog
ReplyDelete