Close
Close

Putting Google Adsense ads inside your Posts

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 ProBlogger – 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 = “300x250_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.

About Darren Rowse

Darren Rowse is the founder and editor of ProBlogger Blog Tips and Digital Photography School. Learn more about him here and connect with him on Twitter, Facebook, Google+ and LinkedIn.

Problogger.net runs on the Genesis Framework

Genesis Framework

The Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Check out the incredible features and the selection of designs. It's that simple - start using Genesis now!

Comments

  1. Vic says:

    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

  2. PC says:

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

  3. Leonivek says:

    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.

  4. Tom says:

    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.

  5. Darren says:

    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.

  6. Nicole Simon says:

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

  7. Mike says:

    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.

  8. Paul says:

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

Trackbacks

  1. [...] 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 [...]