Adding Google Adsense to a Joomla Content Page To Make Money

19th January, 2010 in SEO 3 Comments

Google AdSense is a Google application that allows website owners to earn revenue from visitors to their website. It’s those “Ads by Google” links you see on this blog page below this post, and on the right hand column. It’s a great way to earn a little extra income if you have a busy website. This blog describes how to add Google AdSense inside a content page on your Joomla website.

What Is Google AdSense

Without going into too much detail, (because this post is how to add it to Joomla) Google AdSense is a Google application that allows website owners to display Google links on their website, which when clicked, will generate some revenue for the website/AdSense account owner.  So if you have thousands of daily visitors, you could earn yourself a nice little income by displaying these links on your website. Google tries to create links relevant to the page content that the ads are displayed on so visitors may be interested in clicking these links.

This method can also be used to display the code on all pages using the normal way to show modules on your site, but I go into detail on how to add within a specific page content.

You can create a Google AdSense account here

How Do I add Google Adwords To A Content Page?

The Joomla editor can strip out special code that is required to display the AdWords, so without some advanced configuration you can add the AdSense code using Joomla modules and the “loadmodule” position function that is used to display a Module Position in any content page.

First, Install a Module to Allow Code to Be Entered

The Joomla Editor will strip out some special code entered into it, making it hard to enter some code like javascript required to display AdSense ads. To overcome this you can install a Module that allows any code to be entered.

  1. Download a Custom Code in Modules from the Joomla Extensions directory for Custom Code. A suitable one is Blank Module.
  2. Go to Extensions -> Install/Uninstall to install it.
  3. Click Browse and choose the downloaded zip file
  4. Click Upload File & Install

The Custom Code in Modules module should show have installed.

Second, Enable the loadposition plugin

  1. Go to Extensions -> Plugins
  2. Ensure the Plugin Content – Load Module is enabled
  3. If not, click on the Enable icon to enable it

Third, Create  New Module for the AdSense Code

  • In Admin go to Extensions -> Module Manager
  • Click New
  • Choose the newly installed module to add custom code, e.g. Blank Module.
  • Enter the code in textarea required for the custom code
  • On the top left, give the module a Name, and choose Show Title = No (unless you want the module title displayed) and Enabled = Yes.
  • For the Position drop down, enter a position name you want to refer to this module as (its a drop down but it allows you enter your own text). So you can call it something like “google_adsense”.
  • Click Save

You have now created a module in position “google_adsense” that has the Google AdSense code.

Lastly, Add the Module to Your Content Page

To display it on an Article page (not in another module or component), just enter the following in the page content editor, click Save and it should display on the website:-

{loadposition google_adsense}

You can re-enter this code to load the same position on multiple pages if you want.

Comments
Picture of Victor

Victor 24th June, 2012 at 22:50 pm

Hi Laurence,

Thanks for this great article.. I was looking for this for a long time.

I have just one question which is not very clear for me.. when creating the blankmodule with the Adsense code in it.. before you save that do I also need to assign the module to a specific page? or should I leave it as default on 'All' -menu?

Picture of Laurence Cope

Laurence Cope 25th June, 2012 at 10:22 am

Hi Victor

If you want the AdSense to appear on all pages then leave it as Default/All. If you want it to appear only on certain paged then choose the menu items to assign it to.

Picture of www.edsdisplays.com.au

www.edsdisplays.com.au 16th April, 2013 at 11:32 am

Thnx for publishing these details on your website.

Leave a Reply

Recent