Come join me in my journey to explore the various features and capabilities of IBM Websphere Commerce and understand how retailers can benefit from its really cool out-of-box functionality.
A
Sitemap is an xml list of all the pages in your store that is submitted
to search engines so that they will know what to crawl and index.
The Sitemap Generator has been enhanced in Feature Pack 3 to index
the new friendly website addresses and search landing pages.
With the WebSphere Commerce integration with sitemaps, you
can create a sitemap XML file, sitemap_ storeID.xml, that
contains a list of URLs for your site. This way, customers are able to easily
find your site when they perform a search, promoting activity to your site,
and increasing the probability of sales.
The sitemap_ storeID.xml file is placed in the following
directory:
The OOB command SitemapGenerate can be scheduled at regular intervals to generate the SiteMap XML. Please refer the link Creating and scheduling the SitemapGenerate job for more details on the scheduling.
Title and metadata information is valuable for allowing your store's pages to stand out on the internet. With the search engine optimization feature for WebSphere Commerce Version 7 Feature Pack 3, each web page in your store is provided with unique content to improve its ranking in search results.
The title and meta description data is comprised of:
Page title
The page title appears in the customer's browser's title bar For example: Large Adjustable Desk Lamp | Madisons Meta description
The meta description is used by search engines to provide a description of your site and the current web page's contents for a search results page. It is stored in the web pages HTML and is not viewable on the page itself. Meta keyword
The meta keyword is used for your store's static pages such as the contact us or help page for search engines to accurately rank and index the web page. It is stored in the web page's HTML and is not viewable on the page itself. Image alt text
Image alt text describes the contents of an image for search engines to accurately rank and index the image. It is viewable by hovering over the image on the web page and can be used for text to speech systems for the visually impaired.
In this demo video , we will learn how to define the TMD for the new static "Suggestions and Complaints" page which we have created in the Day 4 : Demo - Creating short SEO URLs for new static views.We will also understand the OOB tables.
Lets start the final legs of our marathon!
Demo Help Content
SQL Queries
insert into seopagedef (seopagedef_id, pagename, storeent_id, lastupdate, createdtime) values ((select max(seopagedef_id)+1 from seopagedef), 'SUGGESTIONS_PAGE', (select storeent_id from storeent where identifier = 'Madisons'), '2012-04-22 00:00:00.00', '2012-04-22 00:00:00.00');
update keys set counter = counter+1 where tablename like 'seopagedef';
insert into seopagedefdesc (seopagedef_id, language_id, title, meta_desc, meta_keyword, image_alt_desc, lastupdate, createdtime) values ((select max(seopagedef_id) from seopagedef), -1, 'Suggestion and Complaints at <seo: StoreName/>', 'Suggestion and Complaints at <seo: StoreName/>', 'Suggestion and Complaints <seo: StoreName/>', 'Image for Suggestion and Complaints at <seo: StoreName/>', '2012-04-22 00:00:00.00', '2012-04-22 00:00:00.00');
select * from seopagedef where storeent_id = (select storeent_id from storeent where identifier = 'Madisons');
select * from seopagedefdesc where SEOPAGEDEF_ID in (select SEOPAGEDEF_ID from seopagedef where storeent_id = (select storeent_id from storeent where identifier = 'Madisons')) and language_id = -1;
select * from SEOPAGEDEFOVR;
JSP Changes
The SuggestionComplaints.jsp used can be downloaded from this link. Place it in the following directory - /Stores/WebContent/Madisons/StoreInfoArea/
301 URL redirection has been included as part
of the SEO solution for WebSphere Commerce Feature Pack 3. If a URL
is changed either by WebSphere Commerce or a business user, a redirect
is automatically generated between the old and new URLs.
URL redirects have been implemented for the following cases:
When the URL of a catalog entry, catalog group or static page
is updated, a redirect is automatically generated between the old
and new URLs.
When an extended site specific URL for a catalog entry or catalog
group is created, the asset store URL is duplicated to the extended
site and then a redirect is created between the extended site duplicate
of the asset store URL and the new URL
When an extended site specific URL is cleared for a catalog entry
or catalog group, a redirect is created between the extended site
URL and the asset store URL
In all of the above cases if the URL of a catalog entry or catalog
group is updated multiple times then all previous redirects are updated
to point to the latest URL for that catalog object. In this way redirection
chains are avoided.
Demo Video
URL redirect traffic
Traffic statistics
are recorded for individual redirect mappings. These statistics are
held in the SEOREDIRECTTRAFFIC table.
This
table holds:
The last used date of individual redirect mappings
The number of times that those redirect mappings are used
While there is no out-of-the-box user interface to view these
statistics, these values are useful:
A custom user interface can be created in order to monitor when
search engines, affiliate links, and customer's personal bookmarks
are still referring to old URLs for your catalog entries or catalog
groups
For determining when to delete old URLs from the database in
order to improve system performance.
Performance Consideration
In order to help with performance, redirect traffic data
is not sent to the database on each use of a redirect rule. Instead
that data is stored in a cache, and is only flushed to the database
once a certain number of redirect usages has occurred. This number
is configurable by referring to the redirectHitCountBatchUpdateSize parameter
in the SEORuntime section of the wc-admin-component.xml
infrastructure configuration file.
Removing unused URLs
When redirect mappings
have not been used for some time it is safe to delete both the mapping
and the original URL that is being redirected to decrease your database
footprint. Unused redirected URLs are cleaned up automatically after
60 days by running a scheduler job. This number is the default out-of-the-box
but is configurable by referring to the "numberOfDays" value in the
SEORuntime section of the wc-admin-component.xml
infrastructure configuration file.
Out of the box Scheduler : CleanSEOURLS
The CleanSEOURLS job command is used to clean
up the tables related to search engine optimization (SEO) URL redirects
and SEO URL keywords. An SEO URL redirect rule is deemed obsolete
if the date the rule was last used by an incoming HTTP request has
exceeded 60 days.
This number is configurable by modifying
the infrastructure component configuration file (wc-admin-component.xml).
Once a redirect rule is deemed obsolete the original url keyword that
was used in that rule is also deleted. These are the URL keywords
that are marked as "inactive" when a redirect rule is created.
Let us revisit and do some practical based on the concepts learned on Day 1 to Day 3.
In this demo tuturial , we will create a short SEO friendly URL for a custom view that we have created "SuggestionsComplaintsView" using the WCS 7 SEO Pattern mapping files in simple 3 steps.
We will change the long WCS URL
http://localhost/webapp/wcs/stores/servlet/SuggestionsComplaintsView?storeId=10051&catalogId=10051&langId=-1
to
Short Search Engine optimized URL
http://localhost/webapp/wcs/stores/servlet/en/madisons/suggestion-complaints
Pack up your energy drinks and lets sprint into the SEO world. I hope you will find it in useful.
Demo Video:
Help Section:
The JSPs and XMLs used in this demo can be downloaded from this link.
Pattern Definition made in the SEOURLPatterns-ext.xml
SQL Executed insert into seotokenusgtype (tokenusgtype_id, tokenusgtype, primarytoken,storeent_id, isstatic) values ((select counter+1 from KEYS where tablename='seotokenusgtype') , 'SuggestionComplaints', 'SuggestionComplaintsToken',<store-id>, 1); update KEYS set counter=counter+1 where tablename='seotokenusgtype'; insert into seourl (seourl_id, tokenname, tokenvalue) values ((select counter+1 from KEYS where tablename='seourl'), 'SuggestionComplaintsToken', 'SuggestionComplaintsToken'); insert into seourlkeyword (seourlkeyword_id, seourl_id, storeent_id,language_id, urlkeyword, status) values((select counter+1 from KEYS where tablename='seourlkeyword'), (select seourl_id from seourl where tokenname='SuggestionComplaintsToken'), <store-id>, -1, 'suggestion-complaints', 1); update KEYS set counter=counter+1 where tablename='seourl'; update KEYS set counter=counter+1 where tablename='seourlkeyword';
Pattern files are used in the construction and deconstruction
of SEO friendly URLs. A pattern file contains a template or model
for a URL type in a store, such as a category, contact us or product
page as each page type requires different data to be constructed.
The below diagram summarizes all the important learnings and explains how the SEO URLs are created based on the pattern definitions in the SEOURLPatterns.xml.
To avoid having to hard code SEO friendly URLs in the
storefront pages, the WebSphere Commerce Search Engine Optimization feature
provides a wcf:url tag that will construct SEO friendly URLs using
the SEO pattern file(s) and tables.
The current wcf:url
tag is used by all starter stores to construct SEO friendly URLs. The UrlTag
class has been enhanced to support the use of the new URL
pattern definition to create SEO friendly URLs.
Incase you open any JSP , for example CachedFooterDisplay.jsp,
you will notice that our old friend <c:url> tag which was used to
construct the URLs in WCS6 has been replaced by <wcf:url>. So, let us spend some time leaning about the tag.
About the wcf:url tag
The wcf:url tag builds a URL
and applies the appropriate WebSphere Commerce supported rewriting
rules.
It contains the following additions compared
to the c:url tag:
It builds a full path URL, rather than a relative path.
It builds SEO compliant URLs if the feature is used in WebSphere
Commerce.
It adds a prefix to the URL with the appropriate protocol, HTTP
or HTTPS, depending on the Struts configuration files.
To know more about the tag and its parameters , please refer Infocenter
Important Note for FEP3 and above
Both the new Feature Pack
3 and previous SEO implementations are supported. You can choose which SEO
solution to use by updating wc-server.xml.
Either value or patternName
is required. If workspace is used, then both value and patternName
are required. If the value parameter is provided, then URLs will be
constructed based on the mapping found in SEOUrlMapper.xml file
using the SEO implementation from WebSphere Commerce Version 7 to
Version 7 Feature Pack 2. If patternName is provided and SEO is enabled
in wc-server.xml as shown in the following example,
then URLs will be constructed based on the Version 7 Feature Pack
3 SEO design, using the pattern template definitions. Preference will
be given to the patternName attribute over the value attribute.
If URL construction using patternName
fails (due to an invalid patternName or a missing parameter), dynamic
URL's will be constructed if the dynamicUrl attribute is set to true.
If dynamicUrl is set to false, then wcf:url tag returns defaultUrl
specified in wc-server.xml
The URL creation
order is:
If SEO Enabled and patternName specified, use patternName and
construct new SEO URL
If new SEO URL construction fails and dynamicUrl = true, a dynamic
URL is constructed
If dynamicUrl = false, a defaultUrl is constructed
Otherwise the value attribute is used an old SEO URL is constructed
The following diagram helps understand the SEO URL differences and the tag parameters :
Example
The following example forms a URL
to display the shopping cart using the <wcf:url> tag.
It specifies the URL type as an AJAX call.
Search engines, such as Google, are one of the most
important channels for customers to reach your store. Using search engine
optimization (SEO) to improve page ranking can result in increased traffic and
revenue. We can understand its importance deeply and this is our attempt at understand the OOB capabilities of WCS 7 with regards to SEO and how it can be used for a Smarter Commerce.
The SEO functionality for WebSphere Commerce Version 7 Feature pack 3
or later improves online search page ranking for your store by creating short,
clean SEO-friendly URLs with meaningful keywords. This version includes enhanced
Management Center tools that business users can use to influence page ranking
by changing the URL and metadata information, an improved Sitemap generator
that indexes all the SEO-friendly URLs, and 301 URL redirect rules.
Search engine optimization for WebSphere Commerce provides
the following functionality:
Creating
simple, static URLs for store pages that shoppers and search robots can
easily understand
Optimizing
page meta data to improve search engine page rank
Creating
301 URL redirection when a web page has moved
Generating
Sitemaps to submit to search engine provider
We are starting a week marathon to understand each of key capabilities.So, pack up your energy drinks and get ready to run with me!