I was recently optimizing Adsense on one of my Blogger sites and decided I wanted to place Adsense inside the posts - but only on single posts, not on the home page or in the archives. Here’s how.
Why Blogger?
Although my primary blog platform is WordPress, I do occasionally use Blogger for some side projects. Why? Go and read everything that Grizzley’s written on his Make Money Online For Beginners site. Blogger can be an excellent option. It’s free, easy to create a site, can scale to handle massive traffic etc.
The only downside to Blogger is the limited ability to customize the site. With WordPress I can change pretty much anything I want. With Blogger I can only change things within the narrow framework that Blogger allows. In this case, I ran into the limitations with the built-in options to display Adsense ads.
Blogger’s Built In Options To Display Adsense
The easiest way to add Adsense to a Blogger blog is via the built-in gadget. I won’t go through the whole process, as it’s written about elsewhere, but you can add an Adsense gadget in the same way you can add a Profile gadget, Text gadget, Poll gadget, etc. Just go to Layout, then Page Settings, then click on Add a Gadget, select the Adsense gadget and then configure it.
The first time you use it, Blogger will ask you for your Adsense publisher number and link the blog to your Adsense account. Then you simply decide where you want the gadget to appear, what size and colour the ads should be and you’re off! You’re ready to start making money online.
You can also add Adsense between posts. To do this, click Edit on the Body gadget and turn on the Show Adsense Between Posts option. You’ll then be presented with the same options that the gadget gives you (size, colour etc).
Limitations With Built-In Options
There are several limitations to using Blogger’s built-in Adsense gadget:
1. Can’t Put Adsense Ads Within Posts
The main limitation with using the built-in Adsense gadget is that you can’t place ads within a post. You can add them before posts, after posts, between posts, in the sidebar, but not in the actual post.
It’s well known that the CTR (click through rate) is higher for ads within a post than for ads in other positions. So putting Adsense within a post will make more money for you. I cover how to do this below.
2. Can’t Use Channels
Another limitation of the built-in Adsense gadget is that you can’t use channels to track the performance of ad units.
However, this isn’t really a limitation - if you want to use channels, simply create your code on the Adsense site, then copy and paste your Adsense code into a JavaScript gadget, instead of using an Adsense gadget. In all other ways it will work the same as the Adsense gadget.
3. Blogger Only Shows Three Ad Units
The last limitation is only an issue for those people who place an Adsense unit in the sidebar. Some people choose not to do this, but I find that an Adsense unit in the sidebar performs relatively well (not as good as units at the top of the page, but better than those lower down the page).
The problem is that Google makes sure that only three ad units are displayed on a Blogger page, as per their Terms Of Service. Great in general, but it means you have less control over which ad units appear. Unfortunately the sidebar is rendered last in most templates, so it’s one of the units that disappear if there are too many units on the page.
This won’t happen on the single post page. However, if you display ads between posts (or within posts) then the sidebar ad unit will disappear on pages with multiple posts, such as the home page and archive pages. I explain how to overcome this below.
Adsense Within Posts
As I mentioned above, you can’t place Adsense ads within the post body using the built-in gadgets. To do this, we’re going to have to put our Adsense code directly into the template.
We still can’t put the ad unit in the middle of the post, but we can put it at the top of the post, below the title, with the text wrapping around it. Great! That’s proven to be the most effective placement, so that’s exactly what we want.
Now, the technique used to do this isn’t new. In fact I learned how to do it by reading Bonnie Calhoun’s Wrapping Adsense in Blog Post. You can go and read her post for the full instructions, but here are the basic steps:
- Get your Adsense code from the Adsense website
- Parse the code to replace special characters with HTML entities
- In Blogger, go to Layout, then choose Edit HTML
- Make a backup of your template by clicking Download Full Template
- Click Expand Widget Templates
- Search for
or - Place your Adsense code on the line immediately above this
- Save the template
Note 1: It’s very important to parse the code as per Bonnie’s site (ie replace <> with > etc). If you do not do this, your Adsense units will not display correctly and you risk being banned by Google.
Note 2: You probably want to place your Adsense code within a floating div, so that the text wraps around it.
Here’s what the code will look like (with the publisher specific information removed). The first and last lines should already exist in the template, the rest is what you’re adding.
- <div class='post-body entry-content'>
- <div style='float: left;'>
- <script type="text/javascript"><!--
- google_ad_client = "pub-xxxxxxxxxxxxxxxx";
- google_ad_host = "pub-xxxxxxxxxxxxxxxx";
- google_ad_slot = "xxxxxx";
- google_ad_width = 336;
- google_ad_height = 280;
- //-->
- </script>
- <script type="text/javascript"
- src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
- </script>
- div>
- <p><data:post.body/>p>
No comments:
Post a Comment