Wednesday, 1 February 2012

How to put adsense ad units between the content ? (How to wrap ads around the content ?)


This is always beneficial if you wrap your ad units around the content. Doing so helps you in two ways. Firstly your space is properly utilized and secondly, it looks like that your ads the part of your of main content. Following this strategy has always been proved helpful. If you wish to put your adsense ad units between the content or around it, you may follow the following procedure below :




<p style="MARGIN: 0px 0px 5px 5px; FLOAT: right">
<script type="text/javascript">
       //<![CDATA[
       <!--
google_ad_client = "pub-xxxxxxxxxxxxxx";
/*name of ad unit*/
google_ad_slot = "xxxxxxx";
google_ad_width = 300;
google_ad_height = 250;
//-->
       //]]>
       </script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
       //<![CDATA[

//]]>
</script>
</p>

As you see the above code. This code is similar to the code you generate through your adsense account. Follow the steps below:

  • Copy this code from here.
  • Go to the post where you want the ad to appear between the content.
  • Switch to "Edit HTML" view. Now paste the code where ever you want.


Do remember to make the certain changes in the above code. Such as replace all the red colored text with the the text of your original adsense unit.
Secondly, there is an optional change. In the above code there is a blue colored text named as "right".  If you make this as left, the ad will start appearing at the left around the content and if you change it as right, it will appear at the right side of the content.
I recommend to all my blog readers, to try this thing in your site, it will surely help you. 
Enjoy :)

2 comments:

  1. A nice peice of information... expecting for more from your side

    ReplyDelete
    Replies
    1. Thanks for your comment bro. Even I am also more interested to tell things like these, but the only thing is I do not get time for it. Even though your comment was motivating to me and I will try to fulfil your expectations.

      Regards,
      Ankit

      Delete

LinkWithin

Related Posts Plugin for WordPress, Blogger...