Google AdSense Drupal Module

I've had this site up for awhile with some blog content so I'm going to see what happens if I put up some Google ads. It will be an interesting experiment. I'm certainly not going to get rich, but I'm getting some traffic so maybe I'll get enough clicks to pay for my hosting plan (or to upgrade to so my site is faster! :).

There is a beta version of the AdSense module for Drupal 6, so I'll try that one out.

1) Go to adsense module page and download

2) Untar the file

3) Ftp the files into your sites/all/modules/adsense directory (fireftp works well)

4) Turn on the desired modules in admin/build/modules (it's in its own AdSense fieldset). I turned on all modules that didn't have "old" in them (AdSense Core, AdSense Click Tracking, CSE Search, Managed Ads)

5) Configure AdSense (admin/settings/adsense) however you want. I only set the Publisher ID to the correct one (note the various tabs to configure different things). To get your publisher id, log into your Google AdSense account and look at the upper right corner. If you are using AdSense for more than one domain, make sure that your AdSense settings are setup for this (either allow all sites to show your ads or specify each domain). Also, if you are putting ads on multiple websites, you can set up URL Channels in AdSense so that you know which sites are generating more revenue.

6) Enable and place the desired blocks (admin/build/block)

7) Configure the enabled blocks

a) Add a description - this will end up replacing the "unconfigured" text shown

b) Put in the Ad Slot number - not sure if I'm doing this right yet - I created an ad in AdSense and then grabbed the slot number from the generated code - I'll know if it worked in a bit

c) Choose the type of ad(s) to show

You should see a spot for where the ads will show up once Google decides to start showing them. I'm not sure how many days that will take so stay tuned.

Update - 1/1/09 - I'm still not seeing any ads. It could be the ad slot number. Since I wasn't sure what the slot number was for, I searched and found this a Joomla article about it:

"Ad Slot Number - ... It doesn't ad the channel number of you Google ad any more. It will give you a ad slot number. This means when you are making changes when logged in to your Google adsense account, you can change the type and appearance (e.g. colors etc.) of your ad. Any changes you make will automatically change on your website."

So you need a unique ad slot number per ad and currently I'm using the same number for both ads. Perhaps I'm confusing Google. I will change those now and see what happens.

Update - 1/1/08 (again) - after reading this article, I realized that the ads were probably showing up fine but I wasn't seeing them because I was logged in as admin and the Drupal AdSense module doesn't show ads to the admin.

Comments

Thanks

I was having some issues and by reading your article I figured it out. Also, I have Adblock Plus (firefox plugin) and I was not seeing my own ad. Checked in IE and all is well. Thanks again.

I'm a Speaker at DrupalCon Portland