Question: How can I easily add Google Adsense into my Drupal 6x or Drupal 7x CMS Site? Ez-Tutorial/Instructions
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.
This tutorial works 100% for Drupal Versions: 6.0, 6.1, 6.2, 6.3, 6.4 6.5 6.6and Drupal 7.0!.
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!
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
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.