Drupal Module: Google AdSense

Sponsored Links

Drupal Module: Google AdSense

A while back I wrote about Search Engine Optimization, which touched a bit on AdSense. I also wrote a tutorial on how to use Google's AdSense with Drupal

Well, the time has come to make this a module, and here it is : the Google AdSense Drupal module.

It is not as feature complete as I want it to be, but will do the job for most sites.

Wish list includes:

  • Have different colors for different ads. This will allow you to style the left sidebar different from the right sidebar
  • Allow certain roles/users not to see ads (e.g. paying subscribers)

Go ahead and install it and make some money!

Drupal/Adsense Account insertion

I have (I think) followed the instructions line-by-line to activate Adsense on my Drupal site using your module.

I have created a # single-line textfield profile.

Where do I insert my Adsense user info?

I have tried category, title and explanation and still get the same error:There is no site owner Google Adsense Client ID defined. Please define a profile field, and select it below as per instructions, and enter a value for user id 1 as explained below.

My adsense user id is:ca-pub-4207631460xxxxx.

Same problem here.

Same problem here. Something's funky.

I have the same

I have the same problem...please help. I've followed the instructions exactly.

Found the symptom

Using Firefox's Firebug, I can see that the JavaScript to inject (pull) the ads from Google and place them in the box is missing. Hope this helps.

Have you tried to refresh

Have you tried to refresh (reload) that particular page.

Have you tried to refresh

I refreshed many times

Try dropping "ca-" from your

Try dropping "ca-" from your key when you enter it in the adsense profile field. If you do a test code generation at the adsense site, you'll see that only "pub-343443xxx" shows up in the code google generates.

Help (and more problems)

You have to create the Google AdSense Client ID field first, and then you fill it in. Enter category as "AdSense", title as "AdSense ID", make it private like the instructions state, and save the field. Then go to your profile and fill it in.

Now for my problem - I did all of that, and all I get is a box that says "Google AdSense" at the top. The ads never show! If I create a custom block and paste in the Google-supplied code I do see ads so I know my website and AdSense account are otherwise okay. The AdSense module is enabled and all the settings look good. Any ideas?

Clarifications

What does "all I get is a box that says Google Adsense"? Do you mean in /admin/settings/adsense, or on regular pages?

Also, did you try to logout and see if the ads are displaying?
--
Khalid Baheyeldin

How to configure it.

Hey guys.. I just made a tutorial on how to configure the adsense module in drupal. I'd like to answer this guy's question.

"Now for my problem - I did all of that, and all I get is a box that says "Google AdSense" at the top. The ads never show! If I create a custom block and paste in the Google-supplied code I do see ads so I know my website and AdSense account are otherwise okay. The AdSense module is enabled and all the settings look good. Any ideas?"

You are disable from seeing your adsense ads yourself so you don't accidentally click them. The creator of the module did this.

Ok check out the tutorial here to set up your adsense. Then you can use the adsense injector. http://www.hoy-pare.com/node/71