Thursday, November 8, 2012

Tutorial how to place Google Adsense ads inside blogger every post of your blogspot blog.If you want to place Google Adsense Ads Code inside your every post (say already posted post and upcoming posts of your blog) then first of all you will have to parse the code. If you have a blog and have Adsense approved account you can easily place your Adsense ads just by using inbuilt Adsense gadget or by generating Adsense code and placing it in HTML/java script gadget in the side bar of the blog. But here we are going to show you how to place ads inside the post.  So if you want to display your Adsense ads in the middle of your post the follow the steps below:

  1. First of all log in your Adsense account and generate the ads code copy it and paste it on notepad.
  2. Now next step is to parsed the code here we will phrase our code manually to parse the code we will have to replace the following symbols to html tag.
  • < = &lt;
  • > = &gt;
  • " = &quot;
    After parsing your code will look as shown below
    &lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
    google_ad_client = &quot;ca-pub-xxxxxxxxxxxxxxxx&quot;;
    google_ad_host = &quot;pub-xxxxxxxxxxxxxxxx&quot;;
    /* mediumsquare */
    google_ad_slot = &quot;xxxxxxxxxx&quot;;
    google_ad_width = 300;
    google_ad_height = 250;
    &lt;script type=&quot;text/javascript&quot;

    If you can't do manually then paste your code in HTML parser below and it will do it for you.

    Placing the code

    • Now log in to your bloggers dashboard click on layout and select Edit HTML.
    • Then select the check button saying "Expand Widget Templates"
    • Now click inside the html edit box and press Ctrl+F a search box will appear copy and past this <data:post.body/> in the box and click next
    • Then look for the code something similar as shown below

    <div class='post-body entry-content' expr:id='&quot;post-body-&quot; +'>
    <div style='clear: both;'/> <!-- clear for photos floats -->

    • Then past the parsed code just before the above code as shown below.

                     <b:if cond='data:blog.pageType == &quot;item&quot;'>                              
                                    <div style='float:right;padding:5px;'>
                                    parsed code [insert parsed code here]

    • Now click on preview button to see the result the ads will appear between post title and post it may take some time for your ads to be active say 5 to 10 minutes keep passions.

    Then save the template all done enjoy.


    Post a Comment

    Related Posts Plugin for WordPress, Blogger...
    Google Google+