Powered by Blogger.

May 8, 2012

Tutorial how to place Adsense ads inside bloggers post and parsed the code manually

Adsense ads inside bloggers post, www.androidonkey.tkTutorial how to place Adsense ads inside bloggers post after parsing the code manually. 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;
      //--&gt;
      &lt;/script&gt;
      &lt;script type=&quot;text/javascript&quot;
      src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
      &lt;/script&gt;

      If you can't do manually then click here to parse your 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 below or something similar
      <div class='post-body entry-content' expr:id='&quot;post-body-&quot; + data:post.id'>
                  <data:post.body/>
                  <div style='clear: both;'/> <!-- clear for photos floats -->
                </div>
      Then past the parsed code just before the above code and 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 munites keep passions.
      Then save the template all done enjoy.