Unique Meta Description and Keyword Tags
for Miva Merchant Categories and Products
Many people don't realize that they can add unique meta description and keyword tags for each and every category and product within their Miva Merchant store with just the OpenUI Look and Feel module. While it is true that these fields are not as important anymore, especially the keywords tag, some search engines still use the meta description tag and possibly even the keywords tag.
OpenUI provides a meta tag section as shown below. However, a non-seo person suggested this feature, and a non-seo person implemented it.

The problems with this are:
- Most of these tags are not needed by the average store owner.
- If you use any of these tags other than the copyright above the meta description and keywords fields, your meta description and keywords will not appear below the title tag (<title>Pigs R Us</title>) which is optimal.
- On some sites, I see jumbled code in the meta description and keywords tags even though there is no weird code in the corresponding fields.
- Unless you use tokens in the meta description and keywords field, you will have the same meta description and keywords for every single category, product, and screen in your store.
- If you do use tokens, you could still potentially experience the problem of jumbled code in point 3.
What is the Solution to this problem? Use OpenUI tokens within OpenUI's head and body tag area. This will allow you to insert custom meta descriptions and keywords for every category, product, and screen in your store.

As you can see, the meta description and keywords tag are first (other than %OUI%) and then anything else like css, js, etc. comes after that. Below is the code to use for your store. It is for the SFNT, CTGY, and PROD screens. You can also adapt this to include other screens.
%OUI%
<meta name="description" content="%begin_screen|PROD%%VAR(Products.d.desc|NOHTML|WRDLEN|200)%%end_screen|PROD%
%begin_screen|CTGY%%VAR(OUI_Categories.d.header|NOHTML|WRDLEN|200)%%end_screen|CTGY%
%begin_screen|SFNT%Our pig products are to oink for.%end_screen|SFNT%">
Make note of several things:
- Each begin statement is on a separate line for display purposes only. Normally, you should put everything on one line.
- Everything between each begin and end statement will only appear on the specified screen.
- %VAR(Products.d.desc)% grabs the product description.
- %VAR(OUI_Categories.d.header)% grabs the category header.
- NOHTML strips out all the html from each field. This is vital because html code like <table>, <p>, etc. doesn't belong in the head tag area. (<head></head>).
- WRDLEN|200 chops off each field at 200 characters. This is important as we don't want the meta description to be too long and possibly be considered spamming.
<meta name="keywords" content="%begin_screen|PROD%%VAR(Products.d.desc|NOHTML|WRDLEN|50)%%end_screen|PROD%
%begin_screen|CTGY%%VAR(OUI_Categories.d.header|NOHTML|WRDLEN|50)%%end_screen|CTGY%
%begin_screen|SFNT%pigs, piggys, oink, swine products%end_screen|SFNT%">
The one difference between the meta description and keyword tags is that we are only taking the first 50 characters and not 200. Other people have suggested that you use the product header and category footer to enter unique content for each product and category. However, this most likely means that your product descriptions are lacking and category headers are not being fully utilized.
There is a problem if you use quotes ( " ) in your product descriptions or category headers since it will abruptly stop the meta tag and leave text floating about. You can use alternatives to quotes or use this code from Darren Ehlers.
%EXPR(glosub(Products.d.desc, '\"', '')|NOHTML|WRDLEN|200)%
%EXPR(glosub(Categories.d.header, '\"', '')|NOHTML|WRDLEN|200)%
This strips quotes, removes html, and truncates the field to a certain character length. One more cheer for Darren and the OpenUI.
If you would like to put a comma between each word for your meta keywords, use the following code provided by Ray Yates.
%begin_screen|PROD%%ASSIGN(g.desc|glosub('%VAR(Products.d.desc|NOHTML|WRDLEN|50)%',' ',','))%
%VAR(g.desc)%%end_screen|PROD%
%begin_screen|CTGY%%ASSIGN(g.header|glosub('%VAR(Categories.d.header|NOHTML|WRDLEN|50)%','
',','))%%VAR(g.header)%%end_screen|CTGY%
How to Make the Most of the Meta Description Tag For Each Product
Since the first 200 characters of the product description for each product will be used for the meta description, it goes without saying that the better your product description the better your meta description will be. So get to work on your product descriptions and no more descriptions that are five words long!
How to Make the Most of the Meta Description Tag for Each Category
At least some people have five words in product descriptions because many people have zero in most of their category headers. You need to describe the products that are found in each category. Don't wait! Starting working on your category headers today.
Other Options for Unique Meta Descriptions and Keywords Tags for Products and Categories - These are alternatives to the option discussed above. Do NOT do a combination. Pick one method only.
- Enable OpenLanguages

Which will make a meta tags tab appear in each product's administration interface.

The drawback to this method is that there is a compatibility issue with the Storeman Store, Category, and Product Management System.
- Meta Tag Generator module from Miva
This module will basically give you the same thing OpenLanguages does but without the compatibility issue with Storeman. However, it has drawbacks as well, like database corruption issues and lack of support.
I definitely would recommend going the OpenUI token route.
|