Google adsense on Joomla sites

Now a days a popular website builder is a Joomla. So those who use joomla to create their web site should be a method to use adsense to Monatize their site. So if you want to show google's ads on a Joomla website this article will show you how. There are a series of steps that you need to go through to put google adsense onto a Joomla page. These are :
  1. Check what module positions are available in the site template
  2. Decide which of the Joomla module positions you are going to use for the adsense advert
  3. Use the Joomla custom HTML module to insert the adsense code into the module
  4. Test the result
When you check the module positions that are available you may find that there is nowhere suitable or you don't want to use the existing module positions. In that case follow sub topic Adding a new module position to a Joomla template it will show you how to add a new module position and give it a name and location on your template. Let's begin the process, we're going to put adsense onto this site, New to Joomla dot com. Here's a screenshot of how it looks before starting the process. As you can see, no adverts.

Check what Joomla module positions are available in the site template
The easiest way to view the module positions is to log in as administrator, then go to
  1. Extensions > Template Manager using the menu.
  2. Then click the preview button.
You should see the module positions overlaid on the template.
While looking at above image it's useful to note that module positions can have any name, there are no restrictions. Also, where module positions are named, such as 'user 1', 'user 2' etc there is no reason why these should be numbered consecutively or that every number needs to be used. As shown here, the module names are simply strings of text so they can be anything the designer chooses.

The breadcrumb module position is normally used as its name suggests, for holding the breadcrumb trail showing the position of the page within the site. It would be well to leave that alone, unless you are not using breadcrumbs. In this case we are going to put the adsense adverts into the banner module position.

Get the google adsense code for your site
Login to your adsense account and set up and appropriate advert unit that you want to use. If you use channels for tracking don't forget to use a custom channel, copy the adsense code onto the clipboard of your computer.

Add the google adsense code to the Joomla module position
In the administration section go to Extension > Module Manager, then click on the New icon to create a new module, when the list of available modules appears,
click the radio button next to custom HTML then continue, this will take you to the custom HTML module setup page.
There are several things to set here;
  1. Give the module a sensible title, something like banner adsense, so it will remind you what the module does, and which module position it goes into. Click the No radio button next to Show title, then select the banner module position from the dropdown list. The order will be set automatically when you save the module.
  2. You should still have your adsense script code on the clipboard. This has to be pasted into the custom html area at the bottom of the page. However, you can't just paste it in as text, otherwise Joomla will simply show the script, rather than calling the google adsense server and asking it to show adverts. This example shows Joomla with the TinyMCE editor, this may of may not work on your website but the workaround is described below in case you need it. Click the HTML button, shown at 2 above, this will display the HTML source window
  3. Paste your adsense script in there, then click the update button.

Save the custom module and preview your site. Your should see the adsense adverts in the banner module position.

Troubleshooting google adsense in Joomla
If your google ads don't show try the following.

Begin by viewing your site in a browser, then examining the page source. Most browsers have a 'View' menu, and under that you will find Page Source, or something like that. Look down the source, you should be able to recognise the major parts of the page. What you are looking for is the google adsense script, it's easy to recognise because it looks something like this.
The things that makes it easy to spot are the id="banner" and the script tags. Examine it carefully and compare it to the actual google adsense code from you adsense account. If they are not identical go back to the custom html and edit it.

There is also the possibility that the editor that you have installed in Joomla has re-written the code in an attempt to tidy it up. The first time I installed adsense code in this way (as shown above) the TinyMCE editor (the default Joomla editor) rewrote the script code as html comments. So when the page was viewed no ads showed.

Workaround for editor re-writing problems
If you find that your editor has re-written the script code, then you need to turn off the editor for the duration of the setup of the custom html, then turn it back on when you have finished.

To turn off the Joomla editor, go to the Administration panel and click users, then click on your own login name, (Administrator),then look to the right-hand side of the page at the parameters section and set the editor to no editor as shown.
Save the changes, then go back to the custom module and you should find that the editor at the bottom of the screen in not just a textbox. Paste your adsense script in there, save the changes and view your site. You should see the adsense ads appearing. If not check your work.

Don't forget to return to the user administration section and reset the editor back to whatever it was.

Finally...Here's how the google adsense ads look in the Joomla site here at New to Joomla dot com.

0 comments:

Post a Comment

Contact Form

Name

Email *

Message *