How it works
- An account needs to be created on the Recombee site. Recombee is a SaaS and a subscription is needed to host the data and produce the recommendations.
- Recombee module is enabled and API authentication information is configured for both the private and public APIs. This info will be used for indexing and querying.
- The Search API Recombee module, once installed, is able to push content across to the Recombee index when content is updated.
- The Recombee Tracker block, embeds a tracking script in the site for the content types and roles which need to be tracked. It is important to target the tracker to run on relevant content and for the users who will interact with the site in a "normal" manner. We recommend not tracking administrators, editors, or other similar roles.
- The Recombee Public Scenario blocks are then placed into the site to display content. There are a number of configuration options including the scenario, the number of items, and the template to use for the transform.
- When the page is viewed, the recommendation blocks are able to pull the client id and item id from the page and use this information to request recommendations from the Recombee public API.
- JSON results are returned back and they are then passed onto JSON Template which will transform them with the correct template and transformer.
- Once transformed the HTML is added back into the DOM and the results are displayed to the user.
- Themers are able to define their own Handlebars templates in the theme layer to transform the results as they like.
Search API Recombee
Search API Recombee is a related module that is able to push content into the Recombee index, in much the same way as can be done with other Search API backends such as Database and Solr. In this case content is pushed to Recombee instead. The index is used for two important things:
- Calculating item similarity based on item properties.
- Populating field data which will be returned with the JSON payload which will be transformed with the Recombee module.
We strongly advise that this module be configured so that recommendation results can be directly transformed by this module.
JSON Template
The transformation of the JSON response is handled by the JSON Template module. JSON Template defines "JSON Template" and "JSON Transformer" plugins which coordinate to transform JSON on the client side. The module ships with a single Handlebars transformer, which is an easy to use templating system for the frontend. The module basically provides a nice way for editors to select a template they would like to use to transform the results.
Recombee ships with a "Recombee titles" template, which uses the Handlebars transformer. This template displays the results in the most basic, generic form. Themers are then able to add their own templates to their theme for more advanced transformations in line with the needs for their theme.
JSON Template is a dependency of Recombee.
Watch a video on how it works!
A demonstration of how the three modules work together.
https://www.youtube.com/watch?v=1EQ_guSlrjI
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion