Area: Episerver Product Recommendations
Applies to versions: 1.0 and higher (JavaScript API)

Recommendations callback

Recommendations [hide]

Episerver returns product recommendations in the form of a JavaScript callback method. When the product recommendations are ready, they are passed to this callback function in the form of JSON data.

var PeeriusCallbacks={
                       smartRecs:function(jsonData) {
                                                      // implementation ….

 The jsonData parameter is a list of recommendation widget elements that have the following properties.

Name Description Usage


Name of widget

[String] This should be used for information only and will vary during A/B testing.

To determine where to place a widget on the page, use the position attribute, below.


Alias of the widget [String] This is used internally by Episerver Personalization. It should be used for information only.


Name of the page position for this widget

[String] This attribute should be used to determine the page position in which to show the widget. It needs to be a unique ID.

This value is stable and should be used to reference (rather than widget).



A list of recommendations




URL of the product image [String]


Product title [String]


URL to the item's product page [String]


Product reference code [String]



A map in which

  • the key is the currency name (such as USDGBP, and so on)
  • the value is a map with unitPrice and salePrice properties.
              unitPrice The item's price per unit [Number]
      salePrice The item's sale price  [Number]


Recommendation id [64bit Number] This is used for marking clicks – see Marking clicks.
    attributes A list of attributes and their values Attributes requested in the tracking request- see Additional attributes in recommendations.
Do you find this information helpful? Please log in to provide feedback.

Last updated: Jan 10, 2018

Recommendations [hide]