Add Google AdSense to Joomla Using Custom HTML Module

Add Google AdSense to Joomla Using Custom HTML Module

How to add AdSense code to your Joomla site has been a curious question for a long time now. 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 desired spots on your website. With the Custom module that comes with core Joomla, we need no separate or additional module/plugin to accomplish this.


Unable to display Google Adsense using Custom Module

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

  1. I see blank display though I pasted the code in Custom Module.
  2. I see blank display though I pasted the code using code layout in Custom Module.
  3. The code disappears upon saving.
Add Google AdSense to Joomla Using Custom HTML Module
Add Google AdSense to Joomla Using Custom HTML Module


The Custom Module that is accompanied by 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.

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

  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 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 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 generated the code a few minutes ago, please allow some time for Google to start pushing Ads on your site. It usually works instantly, however at times may take up to an hour time to begin 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.

About Syed Hussaini

I am a Support Specialist with 15+ Years of experience and exposure in Training, website development on WordPress, Joomla, and Google Sites, Customer Support, IT Operations, Team Management, Knowledge Management. My engagement in a corporate environment and freelance projects has taught me to be highly productive and independent.