Welcome to BuzzMyBlog.com, a community of bloggers helping bloggers to become more successful. It is the home of the Weekly Buzz, which offers free reviews and weekly prizes that help promote your blog. Learn more about the Weekly Buzz.

Weekly Buzz Current Prize

500 EntreCard Credits!

An AdSense Tip You Cannot Afford To Ignore

by Jeff 6/27/2008 1:27:00 PM

I made an amazing discovery regarding Google AdSense that I will share with you in this post. Not only will I share with you what I learned (which you may or may not already know), but I will also explain how to modify your theme template to take advantage of this lucrative information.

Facts About AdSense

According to the Google AdSense Terms & Conditions, you are allowed to place up to three ad units and three link units on a single page. If you have added the AdSense code to your theme template, you don't even have to worry about this. The code will automatically display ad units up to three times. For example, on my main page I show my last 10 posts. In my theme template, I have added my AdSense code at the end of my "post" template. Theoretically, the ad units should therefore display at the end of all 10 posts. But this is not the case. The code is smart enough to display ad units the correct number of times.

I recently learned that Google displays the ads on your page in order of value. This means that the highest paying ad of the three will be displayed first. Google considers the "first" ad to be the first block of AdSense code it sees in the final markup of your page's HTML.

Capitalizing on These Facts

When I learned this interesting fact about highest paying ads displaying first, it caused me to take another look at where I was displaying my Google Ads. Originally, I only had three ad units displayed at the bottom of the first three posts. I realized this was a huge waste of a valuable ad spot! Most people don't read an entire post from start to finish. They'll skim the first paragraph or two and decide if its worth finishing. Often they will get the information they need before the end of the article. Or in my case...before they get to the ad! Since the first ad is the most valuable, I wanted to change my design to highlight this ad unit and put it in a spot that catches the reader's attention.

To further capitalize on this valuable first ad, I decided to make it an image ad to really spark the reader's interest. It will take up more real estate, but by selecting "Image Only" ads when creating my AdSense code, you can increase your chances of getting more clicks. In my opinion, the entire world has become desensitized to Google Text Ads. Without even trying, their eyes just skip right over them. An image ad, on the other hand, can still be attractive and effective at grabbing the reader's attention.

I decided to put the first ad at the top of my Buzz Sponsors section which can be seen in my sidebar to the right.

Houston, We Have a Problem!

Remember earlier that I said the Google AdSense code is smart enough to display the correct number of ad units? In my case, it was displaying all three units in the first three posts. My blog platform generates these posts before it generates the side bar. How then can I make the FIRST ad unit appear at the top of my side bar? Thanks to the magic of Cascading Style Sheets (CSS), the answer to this question is not as hard as you might think.

Updating Your Template

Most blog templates that have a sidebar use an amazing (but often misunderstood) CSS property called float. This property tells a browser to display an HTML element to the left or the right side of its parent element. The beauty of the float property is that when it is applied, the content being floated can occur BEFORE or after the rest of the content. It will look the same either way.

A typical WordPress theme will generate the content first and the side bar second. Here is the code of the default theme's main index page:


<?php get_header(); ?>  // generates the header

<div id="content" class="narrowcolumn">  // generates the main content
  <?php if (have_posts()) : ?>
   <?php while (have_posts()) : the_post(); ?>
       // generate each individual post (omitted for clarity)
   <?php endwhile; ?>
  <?php endif; ?>
</div>

<?php get_sidebar(); ?> // generates the side bar

<?php get_footer(); ?> // generates the footer

See how the main content (the posts) gets generated BEFORE the sidebar? By the time the call to get_sidebar() is made, you've already generated the three allowable AdSense ad units. But, thanks to the amazing float property, we can make a simple change to generate the side bar first! If we move the call to get_sidebar() ahead of the content div, the lucrative image ad in the sidebar will be the first ad generated, but your layout will still look EXACTLY the same. The resulting code should look like this:


<?php get_header(); ?> 

<?php get_sidebar(); ?> // the side bar FIRST!

<div id="content" class="narrowcolumn">  // generates the main content
  <?php if (have_posts()) : ?>
   <?php while (have_posts()) : the_post(); ?>
       // generate each individual post (omitted for clarity)
   <?php endwhile; ?>
  <?php endif; ?>
</div>

<?php get_footer(); ?> 

This works because the side bar has been give the property of float: right, which can be found if you look in your theme's style sheet file. This means that the sidebar content will be pushed to the right side of its container element and the rest of the content will flow around it. It doesn't matter if the float content is generated before or after the rest of the content. Check out this article if you want to learn more about the CSS Float property.

I hope this tip helps you earn a little extra with your Google AdSense. At the very least, it should help you get a little more understanding of your theme's template. Let me know if this works for you or if you have any questions.

Jeff

* To receive more tips and useful blogging information, subscribe to the BuzzMyBlog RSS feed.

 

Currently rated 3.3 by 3 people

  • Currently 3.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Monetizing

Related posts

Comments

6/29/2008 10:31:02 AM

Germán Martínez

Great advice, thanks.
The only thing I'd like to mention is that, when placing your sidebar HTML code on top of the main content (for the float trick) you may have some usability issues.

Germán Martínez pe

6/29/2008 10:37:57 AM

Jeff

Thanks German! What kind of usability issues have you seen?

The only thing I noticed is the sidebar actually gets displayed first. But that doesn't really bother me. I guess on embedded or mobile browsers that don't support CSS, there could be an issue as well. There you would see your sidebar ahead of your content. Again, not too much of a concern for me.

Jeff us

6/29/2008 1:12:53 PM

Germán Martínez

Jeff, that's exactly what I meant, no big deal, just wanted to mention that, in my experience websites work better when the sidebar is below the main content in the HTML.

Just a question, have you tried to display your adds sooner in the post?

Germán Martínez pe

6/29/2008 1:50:45 PM

Jeff - buzzmyblog.com

I am trying to find the perfect balance between profitable ads and minimum user distraction. I think the link ads at the top and the image ad to the right are not too obstrusive. If I moved the post ads, I fear that they would be.

Jeff - buzzmyblog.com us

6/29/2008 3:08:50 PM

Karn Patel

I knew that already... but hey it looks like you helped a couple of people.

Karn Patel us

6/29/2008 3:12:33 PM

Jeff

Hi Karn...helping a few people is all I'm trying to do. If you have any other tips, we'd love to hear them! Thanks!

Jeff us

6/29/2008 3:54:51 PM

aaron

Hey guys,

Is there anyway you can explain where I would go to do this on my blog. This is fantastic info for a first time blogger and would love to truly learn how to do this. If you have the patience or time I would love to read an article or provide a seperate link to something that can help.

Thanks,

Aaron

aaron us

6/29/2008 11:17:41 PM

Jeff

Hi Aaron. If you have a WordPress blog, the code I referenced above can be found in the index.php file found in your theme directory. Stick around BuzzMyBlog.com and sign up for my RSS feed. I will go into more detail about a WordPress theme in future posts.

Jeff us

6/30/2008 9:46:50 AM

John - internetblu.com

Jeff, great post. How do you personally decide between ad placement and content? Couldn't you risk showing (some) spiders that your sidebar content is more important than your actual post? Is there any trade off?

John - internetblu.com us

6/30/2008 11:41:08 AM

Jeff

That is a great point John. I have already established some PageRank at my blog, so I am going to keep an eye out to see if it gets affected or not.

Luckily, my sidebar is mostly made up of my Categories and my Recent Posts - stuff that is good for the search robots anyway. So hopefully it won't make much of a difference.

I am also going to look into some javascript that will allow my main content to be published first, but my ads ordered however I want.

Thanks for the comment!

Jeff us

7/1/2008 9:13:19 AM

pingback

Pingback from grandmasterb.com

Heads Up Seven Up Blogroll - June 30 | GrandmasterB dot com

grandmasterb.com

7/2/2008 12:36:06 AM

Asher

Google Adsene play a vitil role in the progress of blogging.
And now the bogging is a profitable hobby of millions of people on the internet.

Asher pa

7/9/2008 12:06:59 AM

Hendry Lee

You can use the $wp_query->current_post to check for the number of post currently diplayed. You can use it to display only two blocks of AdSense in the post, and then put the third block in the sidebar.

That way, you will have exactly 3 AdSense code in your page.

Hendry Lee id

7/9/2008 12:10:48 AM

Jeff

Good tip Hendry. Thanks!

The important thing was that the FIRST AdSense ad is the most valuable, so how do you make the ad at the top of your sidebar the first one? That is what this post was trying to address.

Jeff us

7/9/2008 12:10:50 AM

Hendry Lee

I can see what you're trying to solve. My tip is useful even if you put sidebar on top, like what you're doing now. It only limits the number of AdSense code you have in a page.

However, it may worth testing though, especially when you use image ads for the ads on the sidebar.

Google always try to maximize revenue on a site, and because the other two blocks are in different formats, it may be displaying the same ads with the same value as when you put it in the first block.

Just a few thought...

Hendry Lee id

7/9/2008 12:12:38 AM

Jeff

I will definitely test it out and let everyone know the results.

Thanks Hendry!

Jeff us

8/4/2008 5:00:19 PM

trackback

Trackback from Remmrit Bookmarking

Bookmarks

Remmrit Bookmarking

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

9/6/2008 12:38:00 PM

Buzz Sponsors

Purchase Stock Photo
The Random Forest Show Your Ad

Recent comments

Social Media

Disclaimer

The opinions expressed herein are my own personal opinions. By reading this you hereby agree not to sue for any reason whatsoever. wink

© Copyright 2008
BuzzMyBlog.com
View our Privacy Policy
Sign in