Question

I tried to configure google adsense on my drupal site. I used two methods. Both of them doesn't work

  1. Copied code from google adsense and pasted it in the html source of a left block. No luck

  2. Installed adsense and adsense injector modules. Ads still dont appear.

pls help

-Vivek

Was it helpful?

Solution

I found this on your page

<script type="text/javascript">&lt;!--
google_ad_client = "pub-5173518975802519";
/* 120x600, created 2/24/10 */
google_ad_slot = "1651449242";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">    
</script>

Change the first line so that it reads:

<script type="text/javascript"><!--

OTHER TIPS

This solution is for Drupal 7. The solution which worked for me is that I used the adsense tags format and then used this format to show ads on the site. Note that this line doesnot need any js inclusion or script tags. You just need to enable the Adsense tags format(I mean shortcode). Actually I was getting Ads disabled for admin and for other users i was getting the empty ad with space occupied on page but nothing shown. After different tweaks and experiments I got the following code working for me

[adsense:336x280:XXXXXXXXXX]

2nd parameter is width x height 3rd parameter: XXXXXXXXXX denotes the google ad slot/id.

I hope this will help others.

Ata ul Mustafa

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top