How to Wrap Adsense Code Inside Blog Post Without Violating TOS

Note: This article assumes you are using new Blogger i.e. widget based template.

Adsense Ads within Blog posts have more CTR (click-through rate). If you google for "how to wrap Adsense code inside Blog post?", you will get many results which violate Adsense policy by modifying the Adsense javascript code. There is a simple way to achieve it without violating Adsense TOS.

Step 1: Read the article, How do I put Adsense on my blog and sign up for Adsense. If you already have an Adsense account, use the "Sign in" link to grant Blogger access your Adsense ID.

Step 2: Go to Template -> Page Elements tab. Then Then, in the "Blog Posts" section, click on "Edit".

Step 3: In the Configure Blog Post pop-up window, check the box next to "Show Ads Between Posts".
Step 4: In "Configure Inline Ads" option, you can then select how often you would like ads to be shown after your posts, your ad format and colors. Click "save changes" once you have finished configuring your ads.

Now, the Ads will be displayed after the blog posts on homepage, individual post page and archive page. To display the Ad within blog post when individual blog post page is visited, follow these steps:-

Step 5: Go to Template -> Edit HTML tab. Check the box next to "Expand Widget Templates".

Step 6: Find,


<b:if cond='data:post.includeAd'> <data:adEnd/> <data:adCode/> <data:adStart/> </b:if>



and wrap it with <b:if cond='data:blog.pageType != "item"'> and </b:if> i.e.


<b:if cond='data:blog.pageType != "item"'> <b:if cond='data:post.includeAd'> <data:adEnd/> <data:adCode/> <data:adStart/> </b:if> </b:if> 


Step 7: Find, <data:post.body> and copy the code


<b:if cond='data:blog.pageType == "item"'> <b:if cond='data:post.includeAd'> <data:adEnd/> <data:adCode/> <data:adStart/> </b:if> </b:if> 


before and/or after <data:post.body> to display the Ads before and/or after the post body respectievely.
Step 8: Save the template. That brings the end of this hack.

Now, adsense ads will be displayed within blog post, when individual blog post page is visited.
So, "Don't be Evil", and wish you increase in Adsense revenue!
0 Comments
Disqus
Fb Comments
Comments :

0 comments:

Post a Comment