Add Google AdSense to Joomla Using Custom HTML Module

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

This has been a curious question for a long time now on how to add AdSense code to your Joomla site. There are tons of modules and plugins that would do the trick of adding your AdSense code to Joomla site. You need to think over which one to use or should you be using them at all. After all this is just a piece of script that needs to be executed over one of the spots on your website. We have a Custom HTML module with the core Joomla, so, why would we need a seperate module / plugin to accomplish this.

Issue:

Unable to display Google Adsense using Custom HTML Module

Well, there has been a lot of confusion on how to do it. Here are some of the most reported issues while using Custom HTML Module:

  1. I see blank display though I pasted the code in Custom HTML Module.
  2. I see blank display though I pasted the code using code layout in Custom HTML Module.
  3. The code simply disappears upon saving.

Resolution:

The Custom HTML Module that is accompanied with the Core Joomla is designed to execute the raw codes and scripts. Please Note: You need a Google AdSense account and Ad Code generated to follow the steps below. Click Here to see steps to generate Google Adsense Code.

In order to get this functioning, you need to carefully follow the following steps:

  1. Log on to the back end of your Joomla website with an Administrator account.
  2. Go to System > Global Configuration
  3. Change the Default Editor to 'editor – no editor'.
    • If you don't change the default editor to no editor the WYSIWYG editor will change the JavaScript, even if you edit the HTML source.
  4. Go to Extensions > Modules 
  5. Now click on New button to create a new module instance and select Custom HTML from the list.
  6. Paste the Google AdSense code here and configure the position and other options as required by you.
  7. Save & Close the Custom HTML module.
  8. Now go to System > Global Configuration & change the Default Editor back to what it was or an Editor of your choice.
  9. Now go to System > Clear Expired Cache and click on Clear Expired Cache button.

Go to the site's front-end and verify whether your Google Ad is loading up.

Please Note: If you have generated the code few minnutes ago, please allow some time for Google to start pushing Ads on your site. It normally works instantly, however at times may take up to an hours time to start displaying Ads.

If you face any difficulty while deploying this module, drop me a line and I will be happy to help you. 

Did you find it helpful? Drop a line and share it forward to help others. Have a nice day.

Get in Touch

Contact me for work opportunities

Follow Me

facebook color   google plus color linkedin color youtube color twitter color