Integration

This document provides a guide on integrating your applications with TellusR.

Solr Requests Modification

While this is not required, you can enhance the quality of Query Reporter and AB-testing functionality of TellusR by extending your Solr requests with the following parameter:

user_id=<string>

The string should be a value that is constant for the user between a search and click or sale/conversion. Meaning that the same user_id should be supplied when searching and when reporting a click or sale/conversion. This could be either an actual (or hashed) user ID or some kind of session ID.

In AB-testing user_id is used as seed for the random generator, making sure that the same user is always forwarded to the same search handler during AB-testing. In Query Reporter it is used for the calculation of click to sale conversion.

Action registration

The TellusR Central provides the following endpoint for registration of clicks and sales/conversions.

POST /api/hit/register
{
  "hitType": "",
  "coreName": "",
  "handlerPath": "",
  "userId": "",
  "docId": ""
}

Where the fields are all strings with the following meanings:

  • hitType - Type of action. Can only have one of the following values: click or sale.
  • coreName - Name of Solr core that has generated the search.
  • handlerPath - Solr request handler that has generated the search.
  • userId - User or session ID that was passed to the search.
  • docId - ID of the document that was clicked or generated a sale.

There is also a GET version of the this interface:

GET /api/hit/register/$hitType/$coreName/$handlerPath/$userId/$docId

If using this, please make sure that the handlerPath is URI encoded.