HOW TO: Adsense Section Targeting In Thesis

Adsense section targeting should be adopted by any publisher serious about earning bucks from the Google Adsense advertisements program on their Thesis site. Targeting basically means telling Adsense which sections of your content should be considered for displaying contextual ads. For example, on a site like Niponwave where I display the OS of the users leaving comments here and a lot of people use Windows, if I were running Adsense, the word ‘Windows’ would have been picked up and many of my visitors would see advertisements related to the Microsoft OS. Get the drift? But if you want to show only relevant and contextual ads to your visitors then adsense section targeting is what you should be after. In fact, this is a recommended practice. Without further ado, let me type out the following few lines of code that will let you have Adsense Section Targeting enabled on your Thesis site in a few seconds.

// Adsense Section Targeting for posts
function start_adsense(){
echo "<!-- google_ad_section_start -->";
}
function end_adsense(){
echo "<!-- google_ad_section_end -->";
}
add_action('thesis_hook_before_post','start_adsense');
add_action('thesis_hook_after_post','end_adsense');

Most people want to target only the posts - the post means the entire content of your post and just that, cutting out all the garbage info like Related Posts, Comments, Author Byline and so on - which is pretty cool. The above code fully achieves that.

However, if your site has an active community and there are always engaging conversations then you will for sure get comments that add more value to the posts, in which case it certainly makes sense to target the comments as well. Enter Adsense Section Targeting for Thesis Comments. Of course I am targeting purely the comment text and not the commenter’s name, the datestamp and other such unnecessary info.

// Adsense Section Targeting for comments
function start_adsense(){
echo "<!-- google_ad_section_start -->";
}
function end_adsense(){
echo "<!-- google_ad_section_end -->";
}
add_action('thesis_hook_after_comment_meta','start_adsense'); add_action('thesis_hook_after_comment','end_adsense');

Finally what about Thesis Teasers? If you are using Teasers on the homepage and archive pages then you will want to target the text contained in the teasers. So here is the code for Adsense Section Targeting for Thesis Teasers.

// Adsense Section Targeting for teasers
function start_adsense(){
echo "<!-- google_ad_section_start -->";
}
function end_adsense(){
echo "<!-- google_ad_section_end -->";
}
add_action('thesis_hook_before_teaser','start_adsense');
add_action('thesis_hook_after_teaser','end_adsense');

Summing it all up, here is the entire code for the ultimate Adsense Section Targeting in Thesis.

// Adsense Section Targeting
function start_adsense(){
echo "<!-- google_ad_section_start -->";
}
function end_adsense(){
echo "<!-- google_ad_section_end -->";
}
add_action('thesis_hook_before_post','start_adsense'); // Adsense targeting for posts
add_action('thesis_hook_after_post','end_adsense');
add_action('thesis_hook_before_teaser','start_adsense'); // Adsense targeting for teasers (optional)
add_action('thesis_hook_after_teaser','end_adsense');
add_action('thesis_hook_after_comment_meta','start_adsense'); // Adsense targeting for comments (optional)
add_action('thesis_hook_after_comment','end_adsense');

Warning: Direct copy-pasting of code from this page may give you invalid characters.

Powered by Gregarious (41)
Share This

Related Entries

Firefox 3

18 Responses to “HOW TO: Adsense Section Targeting In Thesis”

  1. Gravatar Icon 1 Victor Avinash Sinha

    Oh! So it means that if you have a site which displays information about gadgets, it will show ads related to mobiles, laptops, etc.

  2. Gravatar Icon 2 Nipon

    Victor, adsense is a contextual ad program and it shows related ads only by default that means if you write a review of your latest gadget people will see gadget related ads on that page. That is how Adsense works with section targeting enabled or not.

    By targeting you specifically tell Adsense bot to consider particular sections from your webpage.

  3. Gravatar Icon 3 giftvincy

    nice post. keep on posting.

  4. Gravatar Icon 4 Baby UGG Boots

    i’m adding your blog’s rss feed so that i can see your new posts. Keep up the good work!

  5. Gravatar Icon 5 Chastity Fusik

    My friend and I were arguing about an issue similar to this! Now I know that I was right. lol! Thanks for the information you post.

  6. Gravatar Icon 6 fishin 2 go full

    I agree with your HOW TO: Adsense Section Targeting In Thesis, good post.

  7. Gravatar Icon 7 humans vs aliens

    I agree with your HOW TO: Adsense Section Targeting In Thesis, wonderful post.

  8. Gravatar Icon 8 new technology

    “Really great! I got to say I really liked this! I am fascinated by all the coding.. Thanks for taking the time to share this.”

  9. Gravatar Icon 9 Galerias de Chicas

    So I guess the question now is, what could TNs leaders/members do to help this situation?

  10. Gravatar Icon 10 breakyBreelrY

    Looking for a refreshed custom look in your bedroom? Do you like a particularly lush sensuous fabric…or perhaps a masculine leather headboard to set a strong mood? The new class of innovative easy-to-install and affordable headboard slipcovers make bedroom design makeovers a snap-of-the-fingers easy. rn rnMore Home Entertainment Choices – Surround Sound Headboards. With 500+ cable channels pouring into multiple in-house hook-ups, and a dizzying range of land and now satellite radio choices plus millions of music CDs and DVD films, it’s no wonder that high fidelity and multimedia entertainment work their way into our bedrooms. Surround sound headboard designs simply extend the natural reach of film and music into our most private chambers.

  11. Gravatar Icon 11 viajeisrael.org

    You have some enthralling ideas on this issue and I enjoyed reading HOW TO: Adsense Section Targeting In Thesis very much. After finding your blog on Digg, I have added it to my bookmarks in order to share it with friends.

  12. Gravatar Icon 12 Peter

    Hallo, ich habe Ihre Seite über Google gefunden und muss sagen, dass diese mir sehr gefällt! Schön übersichtlich und informativ :-)

    Es sollte mehr solcher qualitativen Seiten geben!

    MFG Peter

  13. Gravatar Icon 13 invest liberty reserve

    Magnificent goods from you, man. HOW TO: Adsense Section Targeting In Thesis I have understand your stuff previous to and you are just too excellent. I really like what you have acquired here, certainly like what you are stating and the way in which you say it. You make it entertaining and you still care for to keep it wise. I can’t wait to read much more from you. This is actually a terrific HOW TO: Adsense Section Targeting In Thesis informations.

  14. Gravatar Icon 14 bunny poker

    I’m looking both for blogs that provides unbiased, balanced commentary on all issues or blogs that have a liberal or left-wing slant. Thanks a lot..

  15. Gravatar Icon 15 male lifestyle

    As you get more aged, a person’s males health problems could very well adjust. Might any alcohol intestine bring about health problems? Is actually men the symptoms of menopause your delusion or maybe a real mens ailment? Could possibly the male growth hormone treatment allow you to feel small just as before? Get answers to all these and various males well being questions.

  16. Gravatar Icon 16 christian louboutin change of the guard
  17. Gravatar Icon 17 dha omega 3

    I like the helpful info you provide in your articles. I will bookmark your weblog and check again here frequently. I’m quite certain I will learn plenty of new stuff right here! Best of luck for the next!

  1. 1 zox pro

Leave a Reply





Which social network do you mostly use?

View Results

Previous Polls

Categories



Close
E-mail It
Socialized through Gregarious 41