SEO path in the shop
This section of the documentation explains how to deal with the SEO path in your shop. A schematic description of the search process is as follows:
- A user enters a search query in the shop
- The web shop server calls FACT-Finder and submits the search query and receives the search results
- The web shop server creates the search results page. As part of this process, it creates links for action elements (Next page, Use filter, Products). For each of the action elements, FACT-Finder provides a parameter block (or URL in the case of the JSON and XML interfaces) that should be returned to FACT-Finder when the user clicks the associated element. The web shop application must incorporate this parameter block into the link assigned to the action element1.
- The user views the search results and clicks a link (for example, Use filter).
- The request is received by the web shop, which decodes the FACT-Finder parameters from the URL and submits the request on to FACT-Finder. Item 3 of this process is repeated unless the user clicks a link that has nothing to do with the search or leaves the web shop.
The processing of the SEO path is basically the same as the process described above. Only the encoding of FACT-Finder parameters into a link and subsequent decoding differ. FACT-Finder already generates an SEO path that can be used in a link. For example, if we were to convert the sample return data from above into web shop URLs, these might appear as follows:
http://www.myshop.de/Herren
http://www.myshop.de/Damen
http://www.myshop.de/Kinder
The SEO path has simply been attached to the shop domain. Now comes the tricky step. The shop has to recognize when a request comes in for http://www.myshop.com/Men
that this is a request for FACT-Finder. The solution to this problem will always depend on the specific shop. One potential simple solution would be to add a prefix to all SEO URLs:
http://www.myshop.de/s/Herren
http://www.myshop.de/s/Damen
http://www.myshop.de/s/Kinder
Now the shop will recognize that any URL that starts with /s/
is an SEO URL. The section following the /s/
would be split off and sent to FACT-Finder as the seoPath. Example using the XML API:
/FACT-Finder/Search.ff?seoPath=/Herren&format=XML
This example is simple. However, as you increase the number of filters that are applied, it becomes increasingly complex:
...shop.de/s/Herren/Jacken-und-Maentel/Wintermaentel/Langmantel.html
The procedure is always the same.
- Extract the SEO path from the FACT-Finder parameters and attach it to the shop URL.
- Recognize which shop requests are SEO requests 3. Extract the SEO path portion from the URL and send it to FACT-Finder as an seoPath parameter
Sometimes FACT-Finder may return additional parameters as well as the SEO path. Excerpt from returned XML:
<element name="Kinder" ...>
<searchParams><![CDATA[/FACT-Finder/Search.ff?seoPath=/Kinder&format=XML&channel=de&followSearch=9899]]></searchParams>
</element>
The parameters can be split into two categories:
- Parameters that the shop has attached and that can simply be passed on. These include “format” and “channel”.
- Parameters that specify the search query and that FACT-Finder has attached. This includes “followSearch” from the above example.
The parameters attached by the shop do not necessarily have to be added to the shop URL. Ultimately, these parameters would simply be reattached by the shop when another request is sent. However, the search query parameters do have to be retained. If they were ignored and not sent to FACT-Finder with the next request, this would lead to unintended search results being presented. The shop URL for the example above would be as follows:
http://www.myshop.de/s/Kinder?followSearch=9899