Loading...
Area: Episerver Product Recommendations
Applies to versions: 1.2-1.3 (Server-to-Server API)
Other versions:

Migrating Server-to-Server API version 1.2 to 1.3

The following is a list of the changes between for version 1.3 of the Server-to-Server API, used for personalization features in Episerver.

Tracking Response

The API response will always contain the pageTrackingId parameter.

You can use this information when tracking on page dynamic searches or Personalized Search & Navigation (formerly Find) requests.

See the Personalized Search & Navigation API document for how to track on page dynamic searches.

userAgent

The userAgent parameter becomes mandatory in the tracking request.

Variant Tracking

You can track product variants on the basket, order and checkout pages.

Search results tracking request

The request payload for search tracking, in particular the searchResults section, has changed to track more accurate information.

Payload for v1.2:

{ 
  "type"          : "searchresults",
  "ip"            : "10.42.37.139",
  "session"       : "155780550/hKugo5RQsqecUpmlWE6EpFWqmalVrJU",
  "cuid"          : "143159800/hKugo5RQsqecUpmlWE6Eo1OklrJYp5U",
  "site"          : "retailer",
  "clientToken"   : "1234abcd5678",
  "channel"       : "web",
  "lang"          : "en-gb",
  "currentURI"    : "www.retailer.com/search.html?term=bags",
  "previousURI"   : "www.retailer.com/home.html",
  "searchResults" : { 
                      "term" : "bags", 
                      "results" : [ 
                                    {"refCode" : "RC1"},
                                    {"refCode" : "RC2"} 
                                  ] 
                    } 
}

Payload for v1.3:

{
  "type"          : "searchresults",
  "ip"            : "10.42.37.139",
  "session"       : "155780550/hKugo5RQsqecUpmlWE6EpFWqmalVrJU",
  "cuid"          : "143159800/hKugo5RQsqecUpmlWE6Eo1OklrJYp5U", 
  "site"          : "retailer", 
  "clientToken"   : "1234abcd5678", 
  "channel"       : "web", 
  "lang"          : "en-gb", 
  "currentURI"    : "www.retailer.com/search.html?term=bags", 
  "previousURI"   : "www.retailer.com/home. html", 
  "userAgent"     : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36", 
  "searchResults" : { 
                      "term"                        : "bags", 
                      "personalisationAttributesId" : "abcd1234", 
                      "totalNumberOfResults"        : 50, 
                      "pageNumber"                  : 1, 
                      "resultsOnPage"               : 18, 
                      "filters"                     : [{ 
                                                        "filter"   : "colour", 
                                                        "operator" : "IN", 
                                                        "values"   : ["red","orange","yellow"] 
                                                       }, 
                                                       { 
                                                        "filter"   : "price", 
                                                        "operator" : "BW", 
                                                        "values"   : ["0","50"] 
                                                       }, 
                                                       { 
                                                        "filter"   : "size", 
                                                        "operator" : "IN", 
                                                        "values"   : ["XS","S"] 
                                                      }], 
                      "topResults"                  : [ 
                                                        {"refCode" : "RC1"}, 
                                                        {"refCode" : "RC2"}, 
                                                        {"refCode" : "RC3"} 
                                                      ] 
                    } 
}

Related topics

Do you find this information helpful? Please log in to provide feedback.

Last updated: May 23, 2018