Written on April 16th, 2005 at 12:04 pm by Darren Rowse

Putting Google Adsense ads inside your Posts

Adsense 9 comments

Duncan wrote a helpful post on How to place Google Adsense ads next to your text - like he says in his post - one of the best positions I’ve found for Adsense ads is within or as near as possible to your content.

Whether you use this approach will of course depend upon the overall purposes of your blog (for instance I don’t do it as much here at enternetusers - but do it more at Digital Photography Blog).

Duncan posts the code that he uses to get his ads into his text - I use a slightly different approach (add a “<” to the start of this code and a “>” to the end (and change the channel and publisher code to your own)…

script type=”text/javascript”><!–
google_ad_client = “pub-XXXXXXXXXXX”;
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = “300×250_as”;
google_ad_channel =”XXXXXXXXX”;
google_color_border = “FFFFFF”;
google_color_bg = “FFFFFF”;
google_color_link = “A40323″;
google_color_url = “999999″;
google_color_text = “000000″;
google_ad_type = “text”;
//–></script>
<div style=”float:right;margin-left:7px;margin-right:10″>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>
</div

This is the code for the 300 x 250 pixel ad on this page. I place it after the title tag and before the body tag on the individual page (I’m using MT on that blog).

The disadvantage of this approach is that it can crowd your post a little, especially if you also place photos in your post at the top of the page - its worth playing around with it to see where it works best on your blog before doing it.

Feel free to use and adapt the code above and let me know how you go with it.

9 Responses to “Putting Google Adsense ads inside your Posts”

  • I’ve increased my CTR quite a bit by employing that technique (and others as well), and I use a format that doesn’t crowd things too much.

    Vic

  • But are you not fiddling with the Adsense code and TOS by inserting div tags between the code?

  • […] t, a la Lockergnome or Darren Rowse’s Digital Photography Blog. Speaking of Darren, he’s written up a post as well, putting his R […]

  • I had originally done this also on my blog when I first started, but it showed for every post on my main page, far exceeding Adsense’s policy of a maximum of 3 ads per page. So I stopped that.

    Getting to know blogger after a while, I realized that I can add tags that will allow me to show the ads only on the item page.

    Now, on my main page, I have 3 ads and 1 Ad-Link. When an item page is currently shown, one of those 3 ads doesn’t show and instead shows within the post.

    Hopefully this will help increase click-throughs.

  • Does anyone have any thoughts or tips on how to properly integrate the 350 X 250 pixel google ad block within Wordpress 1.5 ?

    I think the proper way to do it is to place Darren’s code above within your SINGLE.PHP file which should reside in the directory of your themes folder (the one you are using).

    I have been having waaaay too much fun hacking away with the new wordpress 1.5. This should be illegal to have this much fun. hehe.

  • Good point Leonivek - this is not a strategy you can as easily do on a Blogger blog as it doesn’t have an individual archive like WP or MT does.

    You’re right Tom in suggesting that the above strategy is what you do with WP - put it on your individual entry (some call it a single entry) template not your ‘main’ one or you’ll end up with the ads on every post which both doesn’t look good and is against Adsense’s rules.

  • I started to use that because it does not mess so much with other things but have the problem that I quote quite often (see for example here http://ideengeberin.de/blog/artikel-100.html) but it messes up with my blockquotes.

    Also, if you can work a bit with your code, you can choose to display such add based on the date of the entry.

    I use this on my main blog: Only entries older than 2 days have this inline advertisement. I think this is okay for bloggers so search engine users see it, but not the normal blogreaders. :)

  • Great advice. When we started to implement this on all of our sites, we tripled our $$$.
    Don’t hesitate to show the ads, they are part of the landscape now and it’s almost like people have to click on that little blue link.

  • So that is how you do it! A-ha!

Leave a Reply





The stock video boats that will protect your phone with this case. This is the case to choose if you want easy access to the bottom ports on your iPhone 5. And keep it charged with a monkey Stock Footage so you can stay charged.

Another way of making money online is to get paid to take surveys. But it takes a lot of work to get paid to take surveys so it's easier to use a money making app. You can also get paid to walk where you can record stock videos of things that you see while walking around.

  1. leather flip flops
  2. free stock video coronavirus
  3. Brian Donahue Stanton
  4. plumber orange county
  5. get paid for blog



The iPhone 5’s battery life isn’t bad, but it isn’t awesome, either. With careful use, you can make your iPhone’s battery last all day. If you want to work your iPhone hard, however, particularly when you’re traveling or otherwise away from places to recharge the device, you need a hawaii Sandals and stay charged for a whole nother day. Regardless of which battery case you choose, a bit of advice: Your iPhone 5 requires more juice to charge the final 20 percent of the way.

Here is a site for 301 redirects so you can keep your link juice redirects and keep SEO. The 301 link juice redirects are the best way to maintain your seo.