Sunday, June 17, 2012

How to Insert Adsense or Chitika Ad Code Between the Post Title and Post Body

If you are using your blog for monetization purposes. One thing that you need to put into consideration is  your ad placement. If your ads are placed in the right place, you are more likely to have a high CTR which is equivalent to a higher earnings. One such best place  to display your ads is just below the the post title and the post body. 

If you are using blogspot, you will notice that Google gives you a few option of how to place  your adsense but it doesn't show you how to place in between the title and post.  For other bloggers using other ads Networks like Chitika, then you just have to put the code manually.

Here is a step by step by step guide that will help you in putting your Chitika or even Adsense code ad in between the title and the post body.

To do this, you  first need to convert  the code that you got from Chitika or Google Adsense to XHTML. There are so many programs on the internet that you can use to do this but one that I like and I have used is eblogtemplates and cstnetwork.  Simply copy and paste your code from Chitika or Adsense then click on convert.  No need to worry since Google won't penalize you for doing this.

  • Go to Blogger - Dashboard - Design- Edit HTML
  • Always remember to download your template before you make any changes.
  • Click on Expand Widget Templates
  • Using Control + F
  • Search for <data:post.body/>
  • Go back to the program that you used to convert your code and copy the Chitika or the Adsense code.
  • Just before <data:post.body/>. Copy and paste the following codes; 

  • <b:if cond='data:blog.pageType == &quot;item&quot;'> followed by
  • Your Chitika or Adsense code 
  •  </b:if>  
  • <data:post.body/> 

Your final code will now look like this:
  • <b:if cond='data:blog.pageType == &quot;item&quot;'> 
  • Chitika or Adsense code - inserted here
  • </b:if> 
  • <data:post.body/>

Save your template. If you check your blog, you will find that all posts have ads which are placed in between the post titles and post body.

Related Posts
How to Add HTML Code Below Header


29 comments:

  1. After visiting ur site i made chitika publisher account. but my ads are not working. when some one click on my ads blank page is opened with no results.please help

    ReplyDelete
  2. Sorry. I had some errors in the final part of the coding. I have corrected it. If you have done everything else right, it should work properly now. Check your coding once again. Please let me know if it works. Thanks.

    ReplyDelete
  3. dude no ads are being displayed

    ReplyDelete
    Replies
    1. Please recheck your coding and make sure that everything is right. I have used the same coding in this blog and it is working with no problem.

      Delete
    2. Hi i used it shows a couple of errors like: Error parsing XML, line 1663, column 222: Element type "iframe" must be followed by either attribute specifications, ">" or "/>".

      Delete
  4. I cant find the in my html....
    wat could be wrong ? any Idea ?

    ReplyDelete
  5. EDIT:
    I found the tag, but still ads are not being displayed, nor anything unexpected is happening.....

    ReplyDelete
  6. AGAIN EDIT:
    IT's Done bro !
    Thanx for the guide..
    EVERY ONE READING THIS- IT WORKS !!!
    To see the ads yourself, visit my blog :
    http://mobilepctrickspot.blogspot.in
    Sorry tito bro I wrote 3 back to back stupid comments...He He ..

    ReplyDelete
    Replies
    1. I do not see anything wrong with your comments. You were just asking what you needed to do and there is nothing offending about it. I am glad at last you were able to do it right. I visited your blog and it is working. Thanks

      Delete
  7. very good post but i face a problem. i cannot set it like you. what may the problem? can you clear me?

    ReplyDelete
    Replies
    1. Have you rechecked the coding? What problem are you facing?

      Delete
  8. I have tried this tutorial a couple of times now, and both times it hasn't worked, although in my HTML there are two instances of , which is the one I need to focus on?

    ReplyDelete
    Replies
    1. Sometimes you may have more than one same code. Try to place it in all the codes and find out which one works.

      Delete
  9. I have a problem, I opened an account in chitika and paste the code in one of the web pages of my website. But I want to know how many days it will take for the code for displaying advertisement in my web page

    ReplyDelete
    Replies
    1. It should start displaying immediately after you have placed the code on your website. Recheck your coding to make sure you did not leave anything out.

      Delete
  10. I am not getting any ads using the above in my blogpost .I have displayed ads in sidebar please help

    ReplyDelete
    Replies
    1. Hi. If you have done everything and it is still not working, then you have to contact Chitika about it. I had the same problem but when I contacted them, they fixed it immediately.

      Delete
  11. Its not working even for me. I placed the code as said but only the one I placed in the layout is displaying below the blog ads but the one I changed as you mentioned does not appear with my blog posts and titles.
    Please help
    my blog
    http://fxconfidence.blogspot.in

    ReplyDelete
  12. Nice tips. Thanks for sharing.
    For more tips please visit: http://mutiara-site.blogspot.com

    ReplyDelete
  13. thanks bro do it in myblog http://www.mslangah.com/

    ReplyDelete
  14. i am getting a error of

    Error parsing XML, line 1482, column 72: Attribute name "async" associated with an element type "script" must be followed by the ' = ' character.

    ReplyDelete