Showing posts with label adsense Google. Show all posts
Showing posts with label adsense Google. Show all posts

Saturday, December 20, 2014

How to display an AdSense ad in the middle of a post?

Adsense ads in the middle of posts in Blogger is pretty simple

Manually inserting Adsense ads in the middle of posts in Blogger is pretty simple, just follow these steps below:

Search for <data:post.body/>
in the view of html mode of your template editor.

And replace below code on second  <data:post.body/> ( if not working please try the third <data:post.body/> )
 <div expr:id='"adsmiddle1" + data:post.id'></div>
<b:if cond='data:blog.pageType == "item"'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<div style="clear:both; margin:10px 0">
<!-- Add here the code of your ad -->
</div>
</b:if>
</b:if>
<div expr:id='"adsmiddle2" + data:post.id'>
<data:post.body/>
</div>
<script type="text/javascript">
var obj0=document.getElementById("adsmiddle1<data:post.id/>");
var obj1=document.getElementById("adsmiddle2<data:post.id/>");
var s=obj1.innerHTML;
var r=s.search(/\x3C!-- adsense --\x3E/igm);
if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}
</script>


And now place your encoded ad code below <!-- Add here the code of your ad -->

Save the template.

When you make a new post , go to html view and place
<!-- adsense -->
wherever you need to display google ads .



Tuesday, August 19, 2014

Is it Possible to Delete an Ad Unit in Google Adsense?

Most common questions related to adsense are How to apply for adsense ?
Only See 3 Advert Ad Units on my Site
How to apply adsense ads in my blog or website?
How to create adsense ad units ?
How to delete adsense ad units from dashboard ?
In this case according to the Google Product Forums  you cannot delete once you created an ad unit but You can HIDE your unused ad unit, by clicking on Hide button under Actions.If an ad unit is hidden and idle for a while, Google may automatically remove it from your dashboard.
You could however rename it and reuse the ad unit elsewhere.