Can Not Display AdSense Ads in my Blog Posts


#1

Hello guys,

First of all many congrats to @Mohammad on establishing yet another successful platform for helping out bloggers!

Now the problem that I am facing is that I cant place adsense within my blog posts. In fact they aren’t getting added anywhere on the blog even though I have only 2 adsense units on my blog. I followed this article (Add AdSense right After More Tag) from mbt. My blog is [The Gadget Code] thegadgetcode.com. (sorry cant put links in the posts yet)

I would really appreciate it if someone could help me out with this.

Thanks


#2

Thank you @Furqan_Khuaja and a pleasure to have you here :smile:

Buddy Adsense Ads can be inserted directly through HTML/Javascript widgest but to insert them directly inside the Post body through the template editor, you will first need to encode your code using his tool:

  • [Encode Adsense][1]

Follow the Adsense Booster tutorial only after you have encoded your Adsense code that you get for your Ad unit.

also not that you can only add three Content units, adding a fourth unit will only return a blank space.

Let me know if it still do not work [1]: http://www.mybloggertricks.com/2008/10/convert-special-html-characters-to.html


#3

Yes, This will work.

But inside the Blogger Posts editor, there is no decode required if you directly past the code in Post HTML.

and Decode is required if you paste it template editor.


#4

Thanks for your response bro.

I have actually done both of the things you mentioned that is encoding the adsense code before pasting it and placing a total of 3 adsense units including this one. But still I am unable to add adsense anywhere on my blog.

I had 3 adsense units before but I removed one so that I may be able to put one inside posts.


#5

For Inside the Post, You need to past Code every time manually

for this: Go to > new Post Add Some text or Content that you want to Post

Click HTML from Top Options

Select the Location and Past Direct with out any Decode/Encode

Publish the Post (you can not see before it post)

Visit the newly created Post in new tab

That’s > You can see your new Ads

I’m sorry if you are not looking for the same.


#6

Make sure you have not chosen the option of Asynchronous while copying the AdSense code? If this is what you have done than you will see a blank space instead of Ad being displayed.

Asynchronous Ad units load without effecting other elements on your blog thus decreasing load time but they work only when you have converted all your ad units to Asynchronous from a previous synchronous type.

I am using synchronous versions of Adsense code because Asynchronous sometimes loads pretty well but most often it does not load the AD at all


#7

You were right about the asynchronous part. I got the synchronous one now BUT still cant display ads under post titles. I am using the following code as it is. Do i need to replace something here ?

<script type='text/javascript'> 
$(document).ready(function(){ 

$(&#39;a[name=&quot;more&quot;]&#39;).before($(&#39;#MBT-google-ad&#39;).html()); 
"" $(&#39;#MBT-google-ad&#39;).html(&#39;&#39;);""

}); 
</script>

Thanks alot bro


#8

Thanks @chinnilax for your kind advice. But I am looking for below post title ad placement

Regards,


#9

Figured it out bro. Its done!

Had to figure out the correct data:post.body tag. There were multiple. Now the thing is that its coming after more tag. How can I bring it underneath post titles? Please point me to a post that you may have written because I cant find one.

Thanks a ton!


#10

For that you don’t need to follow the tutorial because the Adsense booster tutorial only helps you to add Adsense just below Read more tag. For normal locations you can follow these steps

To add Adsense ads just below Post Titles do this

  1. Copy the synchronous code from Adsense,
  2. encode it
  3. and then Paste the encoded AdSense Code just above this tag

<data:post.body/>

Add Adsense At Post Bottom

If you want to display Adsense at the bottom of post then add your code just below <data:post.body/> tag

This tag would appear twice. Once for Desktop and second time for Mobile devices. The first occurrence is often for Desktop view so paste it there.


Why is AdSense is no more showing three Content units on a Page?
#11

But it appears under each post title on home page and not just after we open a post. It makes about 7 adSense units in total.


#12

Salam guys, Furqan: now u need to add conditional tag to your adsense code.


#13

@Furqan_Khuaja

Put the converted Adsense code to where you see the annotation, then save the changes by clicking on the Save template button.

<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>

Note: For centering ads, add the center tag before and after the AdSense code, like this:

<div style="clear:both; margin:10px 0">
<center> 
<!-- Add here the code of your ad -->
</center>
</div>

I hope it will help…


#14