We have options in our Dashboard to keep Adsense ad unit either in side bar, below or above posts. But we have observed that placing Adsense unit in the post itself will help you to get much topic related advertisements because of the richness of post wise keywords. But placing an Adsense unit in posts, require some editing in your HTML. Here in this post we will explain you how to place an Adsense Adunit in your posts. Simply follow these steps and if you feel any trouble please feel free to ask us.
GET YOUR AD CODE FROM ADSENSE
Login to your Adsense account, design a new ad unit ( preferably a Text and Link based unit), add channels and select color that matches your posts background. A classic example of preparing Ad unit that matches the layout can be seen here. Click here. Now copy the code of your ad unit.
PARSE YOUR ADSENSE AD CODE
The Adsense unit code which you are obtaining from your Adsense account is in the form of HTML, which need to be parsed before inserting into your blog’s HTML. Parsing is nothing but checks for correct syntax and builds a data structure. There is no harm in parsing an Adsense code before installing.
Visit this CODE CONVERTER TOOL to parse your HTML.You may paste the copied code from your Adsense account into CODE CONVERTER box given there and click on Convert.
Now copy the Parsed Adsense code from that box and keep it for using in the next step.
PASTING PARSED ADSENSE CODE IN HTML OF YOUR BLOG
Log in to your Blogger Account, “DASHBOARD’. Then click on “LAYOUT” and then go to “EDIT HTML”. ( kindly “Download full template” of your current HTML into your computer, as you can bring back your previous HTML incase you make any mistake while editing your HTML).
Now check in the box “ Expand Widget Templates”. Then search and find any of these three codes inside your HTML.
Once you find any one of these code, then paste the “Parsed Adsense code just below that. Before Save Template, just click on “ Preview”. If your installation is correct, then your blog will appear correctly in the preview and you can see Adsense unit there inside your posts. If your editing have any mistake, then it will show in red colors above the HTML box.
CHANGING ALIGNMENT OF ADSENSE UNIT IN THE POSTS
If you wish to change the alignment of Adsense unit inside post, then please include this code also as the first line in your ‘Parsed Adsense Code”
<div style=display:block;float:right;margin: 0px 10px 0px 0px;>
Here you can change the alignment as right, left or center by changing the word ‘right’ in the above given code.
Do visit again