Sunday, April 24, 2016

How to enable SEO urls in ATG/Endeca Integration?

Endeca provides out of the box configuration for generating SEO specific URL. Below configuration needs to be set properly to enable ATG/En... thumbnail 1 summary
  • Endeca provides out of the box configuration for generating SEO specific URL. Below configuration needs to be set properly to enable ATG/Endeca SEO integration.

    Steps to Configure SEO URL with encoded format

    1. Set urlFormatter=/atg/spring/FromSpring/seoUrlFormatter in /atg/endeca/assembler/cartridge/manager/NavigationStateBuilder/ component to enable SEO URL.

    2. Configure "seoUrlFormatter" bean object with different properties  in endeca-seo-url-config.xml as per need.
    <!-- BEAN: seoUrlFormatter This is the top-level URL formatter. 
    It is responsible for transforming UrlState objects into URL strings. -->
    <bean id="seoUrlFormatter" 
    class="com.endeca.soleng.urlformatter.seo.SeoUrlFormatter">
    <property name="useNavStateCanonicalizer">
    <value>false</value>
    </property>
    <property name="defaultEncoding">
    <value>UTF-8</value>
    </property>
    <property name="pathSeparatorToken">
    <value>_</value>
    </property>
    <property name="pathKeyValueSeparator">
    <value>-</value>
    </property>
    <property name="pathParamKeys">
    <list>
    <value>R</value>
    <value>A</value>
    <value>N</value>
    </list>
    </property>
    <property name="navStateFormatter">
    <ref bean="navStateFormatter" />
    </property>
    <property name="ERecFormatter">
    <ref bean="erecFormatter" />
    </property>
    <property name="aggrERecFormatter">
    <ref bean="aggrERecFormatter" />
    </property>
    <property name="urlParamEncoders">
    <list>
    <ref bean="N-paramEncoder" />
    <ref bean="Ne-paramEncoder" />
    <ref bean="An-paramEncoder" />
    </list>
    </property>
    </bean>


    3. Enable URL canonicalization. Click here for more details

    4. Enable N-value Encoding as per below screenshot. This setting would convert long format N-value to Encoded Format. 

    Example 

    Before Encoding
    URL - /_/N-4294865570+104910 

    After Encoding
    URL - /_/N-861Z8q7


    Endeca N-value Decode and Encode Settings for SEO Url

    5.  Set dimension formatter under dimLocationFormatters. This is a list of dimensions value that can be part of URL. dimLocationFormatters get sets under navStateFormatter. 
    Note : User aggrERecFormatter for Aggregate/Rollup Query and erecFormatter for Record Details page.

    Example - Suppose BrandFormatters added here and User selects any brand from guided navigation, Brand name would start coming on SEO URL.

    /women-clothing/adidas/_/N-8bfZ8m7


    Endeca Dimension Formatters for SEO URL


    From Author

    Was this post resolve the solution you are looking for? Provide your comments


    Friday, April 8, 2016

    Endeca SEO : How to enable Url Canonicalization?

    Endeca Url configuration is managed in endeca-seo-url-config.xml. SeoUrlFormatter class generates the SEO URL for refinements or landing pa... thumbnail 1 summary
  • Endeca Url configuration is managed in endeca-seo-url-config.xml. SeoUrlFormatter class generates the SEO URL for refinements or landing pages.



    What is Canonical URL

    Canonicalization is the process of picking the best/one URL when there are several choices.

    Example 

    User is on Category landing page and clicked on brand "Adidas" than Brand "Element", Another user clicked on Brand "Element" than Brand "Adidas" for same Category landing page. As per URL canonicalization, only one URL should be generated, regardless of selection path.

    Scenario 1- /Men-Clothing-T-Shirts/Adidas/Element/_/N-88uZ8m7Z8mk

    Scenario 2 - /Men-Clothing-T-Shirts/Element/Adidas/_/N-8m7Z8mkZ88u

    Any crawlers would treat both URLs as different URL even product records are same and this might lower down page ranking.


    How to setup URL canonicalization?

    set useNavStateCanonicalizer as true in SeoUrlFormatter and create bean entry navStateCanonicalizer as per the screenshot below. This setting would start creating canonical URL from Endeca response
    URL Canonicalization in Endeca using useNavStateCanonicalizer


    Once above setting is applied, the example above will generate only one URL regardless of traverse path. 

    /Men-Clothing-T-Shirts/Adidas/Element/_/N-88uZ8m7Z8mk

    Note :- Enabling canonicalization impacts the breadcrumb orders. 

    Click here to get more information related to Endeca SEO


    Thursday, March 24, 2016

    Endeca SEO : Display special characters in Assembler SEO URL

    In Endeca SEO Implementation, endeca-seo-config-url.xml is responsible to generate SEO URL.  Behaviour:- When using the endeca-seo-conf... thumbnail 1 summary
  • In Endeca SEO Implementation, endeca-seo-config-url.xml is responsible to generate SEO URL. 

    Behaviour:-

    When using the endeca-seo-config-url.xml file to implement SEO in Assembler, the NavStateFormatter doesn't handle special characters correctly and replaces with "-" dashes.

    Example :- Category Name : Bed + Bath, as creating SEO URL, "+" gets replaced with "-" so generated URL would be like "/Bed---bath/_/N-n1xqt8" but it should be "/Bed-and-bath/_/N-n1xqt8"

    • navigationState: "/Bed---bath/_/N-n1xqt8",
    • siteRootPath: "/pages",
    • label: "Bed + Bath"


    Solution :- 

    The RegexStringFormatter defined in endeca-seo-config-url.xml is not configured to handle special character by default so it replaced special character with a "-" character.

    Add the RegexStringFormatter under stringFormatters as per below :-


    <bean class="com.endeca.soleng.urlformatter.seo.RegexStringFormatter">
    <property name="pattern">
    <value><![CDATA[[+]]]></value>
    </property>
    <property name="replacement">
    <value>and</value>
    </property>
    <property name="replaceAll">
    <value>true</value>
    </property>
    </bean>


    This would generate Example as below


    • navigationState: "/Bed-and-bath/_/N-n1xqt8",
    • siteRootPath: "/pages",
    • label: "Bed + Bath"

    Click here to view How to Enable URL canonicalization


    From Author
    Was this post resolve the SEO issue?Provide your comments 

    Tuesday, March 15, 2016

    Oracle Endeca SEO - Avoid repository calls for category pages.

    Category pages require data like page title, keywords description for search engine optimization(SEO) from the category repository. There... thumbnail 1 summary
  • Category pages require data like page title, keywords description for search engine optimization(SEO) from the category repository.

    There are ways to get SEO specific information. ATG-Endeca Integration creates a product.category hierarchical dimension. OOTB integration does not add SEO related attributes/properties to the product.category dimension. As per best practices, get all SEO data using Endeca product.category dimension instead of making repository calls to ATG.

    Endeca provides a  feature to add properties to dimension and it can be added during data export from ATG process. Oracle Endeca commerce out of box provide below attributes:

    product.category > Women--;{DGraph.Spec=cat50001, category.ancestorCatalogIds=masterCatalog, category.catalogs.repositoryId=masterCatalog, category.repositoryId=cat50001, category.rootCatalogId=masterCatalog, category.siteId=storeSiteUS, record.id=atgrep:/ProductCatalog/category/cat50001?catalog=masterCatalog&categoryPath=/cat50001&locale=en_US}

    Add more Attributes to Product.category dimension

    Find out following steps :-

    1. /atg/commerce/endeca/index/CategoryToDimensionOutputConfig use category-dim-output-config.xml to add attributes. Create this file in another layer configuration and add required attributes and properties.

    2. Build Project.

    3. Run baseline from /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin. No coding required from handler perspective.

    4. Go to JSP and use code
        ${category.properties['category.title']}

    Find out the sample XML below :-

    <?xml version="1.0" encoding="UTF-8"?>

    <item item-descriptor-name="category" is-document="true">
      <text-properties>
         <property name="keywords" output-name="dimval.prop.category.keywords" type="string" is-multi="true" xml-combine="replace"/>
         <property name="longDescription" output-name="dimval.prop.category.longDescription" type="string"/>
         <property name="title" output-name="dimval.prop.category.title" type="string"/>
         <property name="noindex" output-name="dimval.prop.category.noIndex" type="boolean"/>
         <property name="noFollow" output-name="dimval.prop.category.noFollow" type="boolean"/>
      </text-properties>
    </item>


    Click here to get more information related to ATG-Endeca Integration.

    Thursday, March 10, 2016

    Prevent to display unwanted endeca query parameters in URL

    Most of the time record filters, range filters are used as part of creating navigation request and fire a query to Endeca using cartridge ha... thumbnail 1 summary

  • Most of the time record filters, range filters are used as part of creating navigation request and fire a query to Endeca using cartridge handler. Endeca returns navigation object that contains record, dimensions and descriptors. Endeca provides Basic and SEO URL formatter to format endeca URL. Most of the clients use SEOUrlFormatter for live application.

    Behavior : - 

    Endeca returns all appended parameters as well, that got added in navigation state builder, part of  Guided navigation and breadcrumb URLs. Nr parameter starts visible in refinement menu URL.

    Example :- /electronics/computers-tablets/computer-accessories/_/N-abcd?Nr=sku.inStock%3A1&Ns=product.startDate%7C1

    Solution : -

    Extend SeoUrlFormatter and override checkIgnoredParamList method. so that ignored parameter would not be sent over to front-end.

    Sample Code below:-

    public boolean checkIgnoredParamList(UrlParam urlParam) {
    if ("Nf".equalsIgnoreCase(urlParam.getKey()) || "Nr".equalsIgnoreCase(urlParam.getKey()) || "_dyncharset".equalsIgnoreCase(urlParam.getKey())
    || "_D:siteScope".equalsIgnoreCase(urlParam.getKey()) || "siteScope".equalsIgnoreCase(urlParam.getKey()) || "_D:siteIds".equalsIgnoreCase(urlParam.getKey()) || "search".equalsIgnoreCase(urlParam.getKey())
    || "_DARGS".equalsIgnoreCase(urlParam.getKey())) {
    return true;
    }

    return false;

    }

    Note: Any customization to SeoUrlFormmater needs to add into SEO URL generator classpath.



    Click here to view How to Enable URL canonicalization


    From Author

    Was this post resolve the SEO issue?Provide your comments 

    How to Prevent to display unnecessary Endeca query parameters in URL?

    Most of the time record filters, range filters are used as part of creating navigation request and fire a query to Endeca using cartridge ... thumbnail 1 summary

  • Most of the time record filters, range filters are used as part of creating navigation request and fire a query to Endeca using cartridge handler. Endeca returns navigation object that contains record, dimensions and descriptors. Endeca provides Basic and SEO URL formatted to format Endeca URL. Most of the clients use SEOUrlFormatter for live application.

    Behavior : - 

    Endeca returns all appended parameters as well, that got added in navigation state builder, part of  Guided navigation and breadcrumb URLs. Nr parameter starts visible in refinement menu URL.

    Example :- /electronics/computers-tablets/computer-accessories/_/N-abcd?Nr=sku.inStock%3A1&Ns=product.startDate%7C1

    Solution : -

    Extend SeoUrlFormatter and override checkIgnoredParamList method. so that ignored parameter would not be sent over to front-end.

    Sample Code below:-

    public boolean checkIgnoredParamList(UrlParam urlParam) {
    if ("Nf".equalsIgnoreCase(urlParam.getKey()) || "Nr".equalsIgnoreCase(urlParam.getKey()) || "_dyncharset".equalsIgnoreCase(urlParam.getKey())
    || "_D:siteScope".equalsIgnoreCase(urlParam.getKey()) || "siteScope".equalsIgnoreCase(urlParam.getKey()) || "_D:siteIds".equalsIgnoreCase(urlParam.getKey()) || "search".equalsIgnoreCase(urlParam.getKey())
    || "_DARGS".equalsIgnoreCase(urlParam.getKey())) {
    return true;
    }

    return false;

    }

    Note: Any customization to SeoUrlFormmater needs to add into SEO URL generator classpath.



    Click here to view How to Enable URL canonicalization


    From Author

    Was this post resolve the SEO issue?Provide your comments 

    Text Widget