Question: How can I easily add Google Adsense into my Drupal 6x CMS Site? This seems hard and impossible! Ez-Tutorial/Instructio
Question:
How can I get Google Adsense ad's to work with Drupal 6x? None of the instructions on the web or forums seem to work right or they don't show up period. These instructions seem way to hard to begin with anyways.
Introduction:
I myself run Drupal 6x and every time Drupal is upgraded, I do so at the first chance I get. As a web host technician I see clients get hacked left and right due to failure of upgrading their CMS or the lack of effort used to try to upgrade. This comes with a few downfalls as everyone knows. Installing customized themes and older modules simply don't work when installed, or stop working all together. I recently ran into this when trying to find a clean way of installing Google Adsense ad's like you see to the left of this web page. I followed every tutorial and instructions posted on the drupal.org forums and various blog pages around the web. Finally, I was able to do it on accident while following instructions that were similar. I will share them with you below.
Note: Please read all of the instructions before assuming these won't work.
Very easy simple steps that any Drupal 6x user can use to get Google Adsense to work right!
Instructions:
1.) Login as the administrator account on your website and click on [Administer]. I will give these instructions using the installed theme "Bluemarine".
2.) Now after clicking [Administer] look on the right page at the top. You'll see two tabs called "By Task" and "By Module". Go ahead and click "By Module" Click Here for Screenshot.
3.) After the new page loads, look for the category [Block] and click on "Blocks" under the category. Click Here for Screenshot.
4.) Once the new page loads click the "Add Block" tab or button so you can create a new block for your CMS site. Click Here for Screenshot.
5.) After this page loads fill out the following forms as instructed.
Block description: * Google Adsense Block
Block title: Sponsored Links
Block body:
Insert the Google Adsense Java Code that is populated for you after creating how you want Google Adsense to work on your page. http://www.google.com/adsense will take you to the login for this.
Click on "Input Format" to display it's options if necessary. This is the most important part. Despite how your running your site, check/enable PHP code "* You may post PHP code. You should include <?php ?> tags." DO NOT CHOOSE Filter or Full HTML options!
Custom visibility settings: Users cannot control whether or not they see this block.
Show block for specific roles: Don't enable either of these options.
Show block on specific pages: Don't choose a option. If you have to, choose: Show on every page except the listed pages. and leave Pages: Blank Unless you know what your doing.
6.) Click on [Save Block]
7.) Now move your new block to your left or right sidebar. You can move this anywhere else, but you might want to test in these positions on your website. Click Here for Screenshot.
Wellah, go to your web page and refresh. You might have to clear your browser cache but I can assure you that it should be working if you followed these instructions in detail. I will post screen shots as soon as I get some spare time.
Comments and suggestions are always welcome with Guest privileges.
- Computer Question Help's blog
- Add new comment
- 553 reads


Version 6.1 provided by godaddy doesn't even have those options
You have only two option under input format...Filtered HTML and FULL HTML. The fix you speak of doesn't even exist.
Yes, it does.
It does exist. I upgraded to 6.4 recently, so I went and checked for myself. All (3) options under INPUT FORMAT do exist. If it doesn't for you then your trying to do this under a custom theme, or your not using DRUPAL. You are welcome to post a screen shot in the forums if you need further assistance.
I was wrong it did work-Thank you-
Wow-thank you for your help on this tough issue
Error message generated
Hi,
I followed your instructions for the latest Drupal 6.3 and get the following error MSG:
Parse error: syntax error, unexpected '<' in /hermes/web07/b1087/pow.username/htdocs/drupal/includes/common.inc(1537) : eval()'d code on line 2
I get no AdSense list.
Thanks for any help.
Hello Perry,
First question. Does the error go away when you disable the custom block you made for adsense?
Second question. Can you fill out the form using my instructions as before and taking a screen shot?
You can send me a private message on the forums if you want for additional ways to contact me live. I help walk you through it on my days off work Tuesday - Thursday.
Cpu Help Admin
It works!
I redid your steps and it now works - I swear I did that before.
Sorry to waste your time but I'm up and running just fine.
Thanks for the help.