Precision Banner Tagging in Joomla
Monday, 10 November 2008 21:42
Advertising and informational banners are an integral part of most web sites but sometimes, despite your best efforts at trying to trick the Joomla Module Manager, sometimes they just will not display where you want them to. A customer of ours had the same problem - no combination of module assignments on menu items seemed to get the right banner on the right page. Fortunately for him the problem had already been solved in Joomla 1.5 with a feature called Banner Tagging.
The theory behind Banner Tagging is quite simple. Give your banners a tag; look at the meta keywords in the page set by articles for example; let the Banners Module marry the two pieces of information together. Sounds pretty simple? Well, it is, and it's only a few simple steps to get there.
Step 1 - Set the Tag Prefix
Banner tagging relies on the keywords inserted into the page. This could happen when you are looking at a regular Joomla Article, a Magazine Category or a Item from Catalog. All these things have the ability to set the meta keywords for in the web page. To improve performance, or reduce the risk of the banners getting confused, or both, we can set a prefix that the Banners extension will specifically look for. To do this, select Components -> Banners from the Administrator Menubar, as shown in the following image.
From the Toolbar, select Parameters. The following image shows the popup dialog box that will appear.
In this example, we are going to use a prefix of "ads_" for all the keywords that we want the Banner extension to be aware of. Type "ads_" in the Tag Prefix field then click Save.
Step 2 - Add Tags to the Banners
Our next step is fairly straight forward. While in the Banner Manager, select one of the banners to edit, as shown in the following image.
Down the bottom of this form is a field called Tags. In this field we enter a comma separated list (if you are using more than one) of tags, all starting with the Tag Prefix that we set in the Banner Parameters. In the example we've added two tags: "ads_red, ads_blue". The tags can be anything you like as long as they start with the prefix. Save the banner and repeat as desired.
The tags that you set for each banner will depend on how you want that banner to behave. In the example we just did, that banner will appear on pages that have included keywords of either "ads_red" or "ads_blue" in their keywords list.
Step 3 - Adding the Tags to your Content Keywords
The next step is to add the tags that we have added to our banners, to the list of keywords of the content we have created for our web site. The following image shows the Keywords field for a regular Joomla Article.
In the Keywords list, we have added "ads_red". This means that if the Banner Module is present when this article is displayed, and tagging is in effect, then the module will be selecting a banner that also has the "ads_red" tag. Because we have set a prefix, it's also going to ignore all the other keywords that have been included for this article, which will give us better performance.
Unfortunately Joomla categories don't have meta keywords, but if you are using JXtended Magazine or Catalog, those extensions allow you to set the keywords for categories and a range of other types of content, as shown in the next image.
One more step to go.
Step 4 - Configure the Banner Module to Use Tags
The last step is to configure the Banner Module to use the tags. To do this, select Extensions -> Module Manager from the Administrator Menubar. Find an existing Banner Module, or create a new one, as shown in the next image.
You can configure all the other settings normally for the module, but set the Search By Tags option to "Yes". Depending on your site, you may need to display this module on every page - just make sure the module position it is displayed in will collapse gracefully if no banner is displayed. When you are done, save the module.
You have now completed everything you need for the tagged banners to work. So, just to recap, when a visitor to your site visits an article (or other item of content) that has a keyword of "ads_red", then the Banner Module is going to try to find banners that are tagged with "ads_red" or "ads_blue". If your article has a keyword "ads_blue", the banners that are tagged with "ads_blue" are going to be shown. Because our example banner was tagged with both, it's possible for it to be displayed in different places (because it might be a generic advertisment that applies to a few places and you want it appearing every now and again amonst the really specific advertisements).
Taking is One Step Further
This example shows you how to set your site up to overcome some deficiencies in the Menu and Module management systems to display the right banner on the right page. However, you can also use this system to generate context sensitive advertising. For example, you could give all the banners related to Sports a tag of "ads_sports", and include "ads_sports" in the keywords list for your articles. So in this case, you are not worried about whether the right banner is displayed on the right page with regard to the menu item, but you are wanting Joomla to select banners the match the content that is currently being displayed.
In summary, Banner Tagging is simple to set up yet extremely powerful. It allows you to more closely control the banners that your visitors see and how they relate to either the page they are viewing, or the content they are reading. We hope you enjoy using Banner Tagging on your site when the need arises.
This work is licensed under a Creative Commons, Attribution, Noncommercial, Share Alike 3.0 Unported License.






Tue Nov 11 17:09:40 2008
Tue Nov 11 19:30:45 2008