Put Adsense Ads Inside Blogger Posts Wrapped In Text

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.

43 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. Thankx Paul !

    ReplyDelete

  4. Dont play with google ads………. this banned my 2 year old adsense account 🙁 now how to retrieve it back

    ReplyDelete

     

    Replies

     

  5. Will Google banned my adsense account if I apply this technique (putting adsense inside my blogger posts) ?

    Delete

  6.  

  7. 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

  8. how to put clicks or ad inside d blogspot .. please guide me i vill b very helpful paul

    ReplyDelete

  9. It work for me buddy! Previously i only added my adsense under the post but now it with the post. Many thanks!

    ReplyDelete

  10. מנהל הבלוגNovember 3, 2011 at 3:34 PM

    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

  11. But if I see, I must doing manual to put in every post. How about if automatic?

    ReplyDelete

  12. Friend.. I see this code, I must put manually in every post. How to put automatically?

    ReplyDelete

  13. 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

     

    Replies

     

  14. Thanks for your care for blogger bloggers. Very pleased.

    Delete

  15.  

  16. How do I remove the code?

    ReplyDelete

  17. Thanks Paul , But i m having a problem. whenever i add any ad (code obtained by adding new unit to adsense My ads ) below my post by placing the code below my second ad in the right side bar vanishes.( for www.yourcyberguide.com )

    ReplyDelete

     

    Replies

     

  18. This could happen if you put an AdSense unit in your posts that is actually wider than the post area.So if you added a 768×90 unit in your posts, the post section is usually between 400-600 pixels.

    Delete

  19.  

  20. Fashin & beauty TipsMay 19, 2012 at 10:22 PM

    Thanks a lot paul for this great post, I did exactly how you explain in your post and ad appear right under the post tittle, this is what i was looking for so long. One more thing, I saw many other small banners on the side bar , how u did that because this is against the google policy.I want to run some other affiliate programs on my blog please have look at my blog(Celebrity Fashion -Johnny Depp Tattoo Designs and please let me know that i can use other affiliate banners with google adsense or not?

    Thank you

    ReplyDelete

  21. i have placed the code but ad always appear on top left corner i want to put it between my text how to do it

    ReplyDelete

  22. its showing me ‘bad request”

    ReplyDelete

  23. Hai i am nikhil for searching for some days in google for placing ads in middle of blogs and i saw many tricks of placing and afraid of adsenses policies i didn’t do it then after reading your blog and commtnts i tried it IT WORKED THANKS PAUL TAHNK YOU SOOOOOOO MUCH

    ReplyDelete

  24. Nice one Paul, absolutely helpful

    http://healthandfitnessvault.blogspot.co.uk/

    ReplyDelete

  25. Hi paul, thanx for this guide. I placed my codes as per your instructions and it’s working also. But the problem is that I can see only one ad at the end of post. How to put two rectangle ads side by side at the bottom of post as you have placed on your site. Plz help me. One more thing I want to ask is that “how many ads I can place on my site”.
    Here is the link of my site. Plz have a glance and let me know. Waiting for your reply.

    www.getalltricks.in

    ReplyDelete

  26. Hi paul, its showing at the end of every post when i click on any post but at the same time its showing on main page also under every post title. I don’t know wts going on. Plz help me soon. Plzzzzzzzzzzzz

    ReplyDelete

  27. It doesn’t work. Blogger ads defaults to the bottom of each post. On the main page blogger defaults to what is selected in the templet. It doesn’t matter where I put on the post it still defaults to the bottom.

    ReplyDelete

  28. Stories trending NowSeptember 5, 2012 at 11:09 PM

    Thanks Bro for the Article,
    But Please can I add the Adsense at the center side area under the post title instead of it being at the left side area.

    Thanks.

    ReplyDelete

  29. I have made all requested changes and now adding in Blog post, but no luck Ads are no appearing, I can only see when I view the post. Please help.
    My Blog URL is Jesoba.com

    ReplyDelete

  30. Marcos Baker MarcosOctober 19, 2012 at 11:03 AM

    Which one is more better
    blogger or
    wordpress

    ReplyDelete

  31. Thanks Paul its really awesome and after adding the ad code in center of my blogpost my earnings increases…Thanks to you…!!!

    ReplyDelete

  32. Thanks for great article

    ReplyDelete

  33. so you place the

    code in the post itself? and do ads take a while to appear

    ReplyDelete

  34. Please can you tell me how to put 160×600 Adsense code in my blogger’s right sidebar? i dont want 160×600 adsense code below the footer when I follow your steps above you posted the article. thank you.

    ReplyDelete

  35. Nice , Also i use plugin to put adsense inside posts

    ReplyDelete

  36. Hy Paul, this is really a great post !

    I tried it and everything is working well on my blogger site, but I’m worried if Google will banned my account using this technique. Is it really ok to use this technique i mean is it by the “book”, did you have problems with Google using this method ?

    Thank you

    ReplyDelete

  37. very nice sharing

    ReplyDelete

  38. It works…Thanks a lot for sharing this useful info with us.

    ReplyDelete

  39. Thanks..for sharing this Great Tips……………

    ReplyDelete

  40. nice

    ReplyDelete

  41. it is not working in blogger.. i have tried it alott of times but not working ..
    how do i fix this .. i have a simple theme .. and no extra plugins installed .. but it doesnt works ..
    the ads dont show …

    ReplyDelete

  42. WOW! Thanks for sharing , now I can also earn some cash by adsense on my kasyno web site, thanks a lot!

    ReplyDelete

  43. hmm strange, I’ve tried and it works correctly!

    ReplyDelete

  44. thanks thats was so useful

    ReplyDelete

  45. It’s working perfectly on my blog. Actually I’m longing for this solution. Thanks http://www.appinstall.blogspot.com

    ReplyDelete