Today I am going to tell you about a simple blogspot blog trick.
Many of the bloggers feel of having an having adsense ads in the posts.
By far this can be now achieved from the blogspot edit post options....
But there is an problem with that...
1. Google adsense team allow you only to place three adsense code.
2. By editing blogspot post you will have to forcefully place all 3 adsense code in your blogspot post.
3. Many bloggers just like to place adsense code in just one and topmost post and rest two adsense code in the sidebars etc...
To overcome the problem of placing the adsense code into the blogger post, the first and the foremost thing you will have to do is just get your adsense code which you want to place inside your post .
After getting your code if you directly place this code in your blogpost , you won't get anything out of it.....
First and foremost thing which you will want to do is to parse the Adsense html code...
you will have to remove < tag with <
you will have to remove > tag with >
you will have to remove " tag with "
ADSENSE CODE BEFORE PARSE
<script type="text/javascript"><!-- google_ad_client = "pub-xxxxxxxxxxxxxx"; /* xxxxxxxxxx, created xxxxxxxxx */ google_ad_slot = "xxxxxxxxxx"; google_ad_width = xxxx; google_ad_height = xxxxx; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> |
ADSENSE CODE AFTER PARSE
<script type="text/javascript"><!-- google_ad_client = "pub-xxxxxxxxxxxxxxxxxx"; /* xxxxxxxx, created xxxxxxxx */ google_ad_slot = "xxxxxxxxx"; google_ad_width = xxx; google_ad_height = xxx; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> |
In my next post I will tell you how to place parsed adsense code in only one and first blogspot post .......