Recommendations

7/20/2012

SiteSeeker can give recommended hits based on how other users have behaved after performing a search query. You can manage which user behaviour will trigger a recommendation.

Step by step

Note that you need SiteSeeker version 6.08 and that it can take up to 24 hours before recommendations are fully functional.

Create recommendations

Recommendations can be created through conversions or clicks. For recommendations based on clicks, a page recommendation is generated every time a user clicks on a page in the results list.

Follow these instructions to choose between conversions or clicks:

  1. Login to SiteSeeker Admin, and click on Search pages and then Recommendations.
  2. For Base recommendations on select conversions or click.

Recommendations are obtained by addingsiteseeker:recommendations as a static search query (search query extension).

You sort the result of a query based on how many recommendations a page have, by adding sort:popularity.

Recommendation based ranking

You can configure the ranking to be based on recommendations. Follow these instructions:

  1. Login to SiteSeeker Admin, and click on Ranking.
  2. Pull the slider Impact of recommendations to the right.

Note that recommendations will not impact the ranking at all in the default configuration mode (the slider to the extreme left). In the maximum mode (slider to the extreme right), the page with the most recommendations will score highest in the results list.

Recommendations in SiteSeeker for EPiServer 4.0.1.0

  1. Check that you are running SiteSeeker 6.08 or later. You can find the version number for SiteSeeker in SiteSeeker Admin.
  2. Make sure that you have version 4.0.1.0 or later of SiteSeeker for EPiServer. Contact Euroling's support if you do not have this version.
  3. Change the choice of HTML-helpers to XhtmlHelpersWithRecommendations or Html5HelpersWithRecommendationsdepending on whether you are using XHTML or HTML5 respectively.
  4. Add the static addition siteseeker:recommendationsto the search query in the recommendation segment.

Register conversions

As mentioned before, you base your recommendations on clicks in the most basic scenario. This will always work, given that click tracking is activated. If you have more advanced requirements of adaptability, you need to use un-conversion. This will give you more flexibility, but it also requires adequate adoptions of the website being indexed.

From a technical point of view, a conversion is registered through a HTTP-call to the click tracking registrar. SiteSeeker for EPiServer will provide the javascript functionality, but you can also manage it yourself, unless it is warranted to load SiteSeeker's javascript outside of the search page. It could also be suitable to register the conversion from the server side, and in that case, javascript is not a feasible alternative.

All SiteSeeker javascript functionality and variables are encapsulated in the global object siteSeeker. The methods that help you to register a conversion are:

siteSeeker.registerConversion(url, sessionId, indexName)

  1. url : the exact url created by SiteSeeker
  2. sessionId : the session ID created at the moment of search
  3. indexName : the name of the index to which the search query is directed

The parameters are being made available to the target page in various ways depending on your configuration. If you have a cookie based session and the target page is under the same domain as the search page, the parameters can be saved in the target page. In other instances, they can be added as query parameters in the search page and thereby be accessible through the HTTP-header referrer.

Exactly how you handle them when they finally arrive at the target page, varies from scenario to scenario. For example, through javascript register the recommendation if the user adheres to a certain pattern (click on a like-button, scroll the page or view it during 5 minutes), or through a HTTP-handler that registers that a PDF-file has been downloaded. Or you can save the parameters in a database for later. The application is driven by your creativity and needs.

You can invoke the conversion functionality whenever you want after running a search query. You would normally do it in the current session, but nothing hinders you from doing it three weeks later, as long as you saved the parameters as outlined above

The javascript uses JQuery, and you may use it as well. What follows is a small snippet of code which triggers an event when the document is fully loaded. Use it to work your magic!

$(document).ready(function() {
// insert your code here to be executed when page is loaded
});

By defining the css style ess-conversion on the html element that would be responsible for the conversion, the hookup of the conversion happens automatically, making it easier to start with conversions out of the box.

Just make sure that the javascript is rendered on the page and that the class attribute of the element is set to ess-conversion.

<%
IHtmlHelpers helpers = HtmlHelperFactory.Get<XHtmlHelpers>(Request.QueryString["indexName"],
new CultureInfo(
Request[UrlParameters.SearchLanguage] ??
"en-US"));
Response.Write(helpers.SiteSeeker_Css());
Response.Write(helpers.SiteSeeker_Javascripts());
} %>
….
<input type="button" class="ess-conversion" id="BuyButton" value="Buy"/>