Last updated: Jan 10 2018

Area: Episerver Perform, Episerver Reach Applies to versions: 1.0 and higher (JavaScript API)

Recommendations callback

Episerver returns recommendations in the form of a JavaScript callback method. When the 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 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 have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/