AdSense Joomla Integration

Monday, February 01, 2010

(0) Comments

AdSense ads are in fact a few lines of JavaScript code that we can embed anywhere on the webpage. If you have static pages then this is pretty easy. You simply paste AdSense code where you want ads to appear. Of course, you have to paste each ad unit individually unless you have some template for the website. Things are not so simple when you are using some content management system like Joomla.

Joomla uses a template system which defines the website layout and module positions. Module positions are places where you can insert page elements like menus, tag clouds, search boxes, social bookmarking widgets or ads. To include AdSense ads in Joomla you can install a dedicated AdSense module or a general purpose code insertion module. Each solution has some advantages and disadvantages.

Dedicated AdSense module is very simple to use. You simply enter your publisher ID, select ad type and size, define channel number, colors, publish module at the desired position and your ad is online. The disadvantage of this approach is that you have no control over the generated code. Google explicitly prohibits any changes to the ad code. In general, AdSense modules accurately regenerate the code defined by Google and there shouldn't be a problem. However, if for some reason this code changes you will have a problem. You should periodically (once in a month or so) check the source code of your website. Not just because of the ads, simply to be sure that all on-page SEO elements are present. When you add new modules and plugins to the Joomla website you may inadvertently cause some changes in page layout, header or at some other not so visible place.

The second approach to include AdSense ads is to use a general module like CustomCode. This type of modules inserts arbitrary code at any module position. This is very convenient where you would like to have total control over the inserted code. The disadvantage of this method is that you must be very careful when changing colors or ad format. It is very easy to change code at wrong place. Of course, you will use this approach if you are an advanced Joomla user and you know exactly what you are doing. With this approach you have also the possibility to add some custom PHP script like displaying advertising only to unregistered visitors or to randomly change ad colors.

Both approaches to insert AdSense ads into Joomla website are pretty simple with appropriate module. And for each module you can select pages where the ads will appear. This way you have a very powerful control over the appearance of ads on your website.

Nihaar Gujjar

0 Responses to "AdSense Joomla Integration"

Post a Comment

My Zimbio
Top Stories Business Blogs - BlogCatalog Blog Directory Directory of Home Businesses Blogs Submit Links DirectoryBlogging Fusion Blog Directory Huwaw Directory