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

JSON tracking variable format

Recommendations [hide]

This article describes the structure common to all pages. Next, additional elements needed for each page type are added for illustration.

  • Elements are mandatory unless the [Optional] tag is present.
  • All values are assumed to be JSON strings, except where the [Number] tag is used (all numbers are 64-bit integers, such as a Java Long data type).
  • The [String] tag explicitly identifies the JSON data type.
  • Indentation and extra whitespaces in JSON response examples are added for readability of JSON data in this document; spaces are not required in the actual JSON responses.

Elements common to all request types.

Name Description Usage
type Type of page The type of the page determines the message format. Valid page types are the following:
lang Language code See Language codes.
user Pseudonymised ID of the user [Optional] This identifies the user in the Personalization system. Use the user ID to improve tracking and recommendations; you can use it also in other Episerver products, such as Mail and Triggers.
channel Access channel [Optional] Available values are:
  • web
  • mobileweb

Note: If omitted, web is assumed.

abTestContent Controls how much A/B test information to return in the info callback. [Optional] Available values are:
  • full Only the test name and A/B group are returned in the response.
  • summary All available A/B group information is returned in the response.
See A/B testing for more information.

Note: If this attribute is omitted, no A/B Testing information is returned.

recContent Recommendation content configuration [Optional] Available values are:
  • fullReturns full product details (such as, price, image, title, URL). 
  • refCodeOnlyReturns a list of elements containing only product reference codes and recommendation IDs. (This is commonly used if stock or prices change frequently, and you want to reference the database for verification before rendering recommendations.)

Note: If omitted full is assumed.

customAttributes Allows real-time filtering of recommendations based on the specified custom attributes


A comma-separated list of attribute names and values. Attribute names must contain no spaces.

"customAttributes" : { 
                       "customerType" : "XL",
                       "userLocale"   : "en_GB", 
                       "userSegment"  : "gold"

Custom attributes are only used in real-time; they are not stored in the system.

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

Last updated: Nov 06, 2017

Recommendations [hide]