The new Blogger widget based template that built on XML specification has a feature to add Google AdSense ad unit inline between posts. These inline ads appear between 2 blog posts on homepage, archive and category or label pages, or after the blog content when the single post is viewed individually. Note that the two lines should be added to the existing block of code in template, not the block which we added in step above. However, the placement is kind of awkward and low performing in term of click through rate (CTR).
A lot of bloggers have put Google AdSense ad code inside the post or wrap the ad unit around blog post by editing template’s HTML to insert modified ad code manually. Some users may feel uneasy on modifying the AdSense ad code as it may violates AdSense TOS. Anyway, there is another workaround to put AdSense ads in Blogger posts, by using trick to move or duplicate built-in inline ads between posts block to inside the post section.
<data:post.body/>And paste the following block of text before (for ad position before content) or after (for ad position after content) the line above:
<b:if cond='data:post.includeAd'>
<data:adEnd/>
<data:adCode/>
<data:adStart/>
</b:if>Note that maximum of 3 AdSense for Contents (non Link Unit type) ads are allowed on each page.<b:if cond='data:blog.pageType == "item"'>The whole block added will look like below:
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<b:if cond='data:post.includeAd'>
<data:adEnd/>
<data:adCode/>
<data:adStart/>
</b:if>
</b:if>And delete these code from template. Note that we have just added a same block of code from step above, so do not remove the newly added code, but the existing code in the template.If you still want the AdSense ad unit to appear between posts when visitors view your blog homepage, label or category pages or archive pages, wrap the code above on top and bottom with the following 2 lines:
<b:if cond='data:post.includeAd'>
<data:adEnd/>
<data:adCode/>
<data:adStart/>
</b:if><b:if cond='data:blog.pageType != "item"'>so that it looks like the following:
</b:if>
<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:post.includeAd'>
<data:adEnd/>
<data:adCode/>
<data:adStart/>
</b:if>
</b:if>
Thứ Tư, 22 tháng 10, 2008
Move Blogger Inline Ads Between Posts to Inside Within Post Position
Người đăng: ngthloi vào lúc 05:22
Nhãn: Tip+Tricks, Tutorials
Đăng ký:
Đăng Nhận xét (Atom)
0 nhận xét:
Đăng nhận xét