Put Adsense Ads Inside Blogger Posts Wrapped In Text


| | 11 comments
adsense in posts bloggerIn this post i will show you an AdSense trick which will allow you to place AdSense ads inside your blog posts not only that but in any part of your posts.Once Added you can place the ads anywhere in the post like after the first line of text, before the last line, in the middle..... and you can have the ads in different areas in every post.

Using AdSense inside blog posts can have a very positive effect on your earnings but try to make the ad units blend in with the rest of the content when your picking the colors.I have more posts on how to add your Adsense Directly Below the Title of your posts as well as placing AdSense in your header section, i will have a link to those posts at the bottom of this one.I will also show you how to wrap your adsense unit in text so it fits nicely and blends with your posts.

There is a bit of extra work in this tutorial but if you follow step by step you should have no problems also make sure to Back up your Blogger template.

Place AdSense Inside Blogger Posts

Get The AdSense Unit


1. Go to your AdSense account and Choose what type of ad you want inside your blog posts.

2. Follow the steps and Grab the code for the AdSense unit.

3. The AdSense code must be place in your blog templates html to do this we must use an adsense praser.

4. I just added a Html Praser to my blog so you don't have to leave this blog to prase the code.
Click here to prase your adsense code.

Paste the code in the box provided click 'prase it' and copy the new parsed code.

Your AdSense code is now ready.

Now we will add the code to your template



1.Click 'layout'--> 'Edit HTML' for your blog
(Tick The 'Expand widget templates' box)

Blogger layout

edit html blogger

Expand widget templates blogger

2. Find the following piece of code in your blogs html:
(Click 'CTRL F' on your keyboard for a search box to find the code)

<data:post.body/>


3. Now REPLACE <data:post.body/> with the code below :


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

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

PUT YOUR PARSED ADSENSE CODE HERE

</div>

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

<script type="text/javascript">
var obj0=document.getElementById("aim1<data:post.id/>");
var obj1=document.getElementById("aim2<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>


4. Now include your AdSense code above were you see:
PUT YOUR PARSED ADSENSE CODE HERE

5. Save your template - Were not finished....

Now as promised you can make the AdSense Ad appear in any part of your blog post :

When you writing your post - Simply place the following piece of code in your post in the exact place you want the Ad to appear:


<!-- adsense -->


So if you place the <!-- adsense --> tag at the top of your post the ad will appear there ...half way down ...near the bottom ...at the bottom...wherever you want it !

Float The AdSense Unit And Wrap In Text

If you want to either float your AdSense unit on the left or right or wrap it in text you can add another snippet of code.The code will be placed above the <!-- adsense --> tag and closed below.

This is the code you will add, i have it set to float on the left wrapped in text with directions to change the position below.

<div style="float: left; margin-right: 5px;">

<!-- adsense -->

</div>

Note - To float the Unit on the right change the red text to float:right and margin-left.

Tip: Add the <!-- adsense --> code to your 'post template' Click 'settings' -->'Formatting' -->Scroll to bottom of page for this option.
(Google help-Whats post template?)

For more AdSense tips and tutorials for adding AdSense to your blog Header section And under the posts title here - Blogger AdSense Tips.I know this was a bit harder than most tutorials but just take you time I'm sure you will get it righ.

Drop Your Comments, Views And Questions Below.
If You Enjoyed This Post Please Take 5 Seconds To Share It.

Stay Connected With Free Updates

Subscribe via Email

11 comments:

  1. This is great, thanks for the info! I added this code to my blog and it works but when I go in and edit my post the tag automatically moves from where I placed it back to the top. Any suggestions?
    ReplyDelete
  2. Hi Emily,

    Im not sure whats happening to you with this one, i used this code on a previous template and never had that problem, in fact the snipit of code
    is still in a lot of my older posts and has not moved.

    Im not sure what the problem is, maybe try installing it again.

    Apart from that im stummped :(

    Paul.
    ReplyDelete
  3. Dont play with google ads.......... this banned my 2 year old adsense account :( now how to retrieve it back
    ReplyDelete
  4. how to make adsense float in the center..
    Can you do a tutorial how to add facebook comment,blogger comment like your above comment box
    thanks
    ReplyDelete
  5. how to put clicks or ad inside d blogspot .. please guide me i vill b very helpful paul
    ReplyDelete
  6. It work for me buddy! Previously i only added my adsense under the post but now it with the post. Many thanks!
    ReplyDelete
  7. is there any way i can use this code a few times?
    for exemple:
    i will have code 1: <-- adsense -->
    code 2:<-- adsense2 -->
    code 3: <-- adsense -->
    ReplyDelete
  8. But if I see, I must doing manual to put in every post. How about if automatic?
    ReplyDelete
  9. Friend.. I see this code, I must put manually in every post. How to put automatically?
    ReplyDelete
  10. Hello, Paul. This is the best post about the topic of how to put an ad in the middle of blogger posts.

    I have searched far and wide. Most of the tutorials are similar in content. This one is simply the best.

    I can easily put the ad anywhere in the post. To do this, however, you need to make it clear that bloggers should follow this:

    Dashboard > Edit Posts (below the blog you want to place the ad) > Click Edit (on the post you want to place the ad) > Place the code as you wish.

    Thanks.
    ReplyDelete

Asking a question ? Make sure to click the subscribe by email link below the comment form to get notified of replies !