Loading...
Area: Episerver Perform, Episerver Reach
Applies to versions: 1.0 and higher (Server-to-Server API)

A/B testing

To run A/B tests that let you test your current setup or existing recommendations against Episerver recommendations, request additional A/B test information by adding the abTestContent property.

Name Short description Usage

abTestContent

Activate A/B test output

[Optional] [String]

  • summary. Returns only A/B test name and the page visitor's group.
  • full. Returns all available information.

If you specify the property name with an empty string, summary is used by default.

To request full A/B test information, set the abTestContent attribute in the tracking request to full, as shown below.

{    
    "type"         : "home",
    "ip"           : "10.42.37.139",
    "session"      : "new",
    "cuid"         : "new",
    "site"         : "retailer",
    "clientToken"  : "1234abcd5678",
    "channel"      : "web",
    "lang"         : "en-gb",
    "currentURI"   : "www.retailer.com/home",
    "previousURI"  : "https://www.google.co.uk/?gws_rd=ssl#q=retailer",   
    "userAgent"    : "Mozilla/5.0 (Windows NT 10.0; WOW64) 
       AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
    "abTestContent": "full"
}

This results in the following info section being returned in the response.

Name Description Usage
abtest   An array of A/B test product records.  
  <productname> The product name.

Where <productname> is one of:

  • smartRecs
  • smartContent
    name A/B test name. [String]
    group The group assigned to the current visitor. [String]
    configs A list of all Episerver A/B test configurations that deliver Episerver recommendations.

Note: If the current A/B group does not appear in this list, no Episerver recommendations are configured to be served for the current visitor.

      <group> An array of configurations to be shown for this test group. Where <group> is the test group letter, such as “A” or “B”.
        name Item name. [String]
The name of the widget, creative, or listing that is shown if the test group letter matches the group assigned to the current visitor.
        position The position of the item. [String]
Describes page position where the item will be shown.

 

A/B testing example 1

{
    "status"        : "OK",
    "pageTrackingId": "523863900/4ubJYHs6gwcwUz9xCjCmng",
    "session"       : {
        "session": "123456789012|a1b2c3d4e5A6B7C8D9E0f1g2h3i4j5F1G2H3I4J5k1l",
        "cuid"   : "09876543210|Z0Y9X8W7V6z5y4x3w2v1U0T9S8R7Q6u5t4s3r2q1P0O"
    },
    "info"          : {
        "abtest" : [{
            "smartRecs": [{
                "name"   : "a/b test",
                "group"  : "A",
                "configs": {
                    "A": [{
                        "name"    : "homeA",
                        "position": "homejson"
                    }],
                    "B": [{
                        "name"    : "homeB",
                        "position": "homejson"
                    }]
                }
            }]
        }]
    }
}

To request only the name of the A/B test and the group of the page visitor, set the the tracking request's abTestContent attribute to summary.

{      
    "type"          : "home",
    "ip"            : "10.42.37.139",
    "session"       : "new",
    "cuid"          : "new"
    "site"          : "retailer",
    "clientToken"   : "1234abcd5678",
    "channel"       : "web",
    "lang"          : "en-gb",
    "currentURI"    : "www.retailer.com/home",
    "previousURI"   : "https://www.google.co.uk/?gws_rd=ssl#q=retailer",
    "userAgent"     : "Mozilla/5.0 (Windows NT 10.0; WOW64) 
       AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
    "abTestContent" : "summary"
}

The resulting response includes this info section.

Name Description Usage
abtest An array of A/B test product records.  
  <productname> The product name. Where <productname> is smartRecs or smartContent.
    name A/B test name. [String]
    group The group assigned to the current visitor. [String]

 

A/B testing example 2

{
    "status"        : "OK",
    "pageTrackingId": "523863900/4ubJYHs6gwcwUz9xCjCmng",
    "session"       : {
        "session": "123456789012|a1b2c3d4e5A6B7C8D9E0f1g2h3i4j5F1G2H3I4J5k1l",
        "cuid"   : "09876543210|Z0Y9X8W7V6z5y4x3w2v1U0T9S8R7Q6u5t4s3r2q1P0O"
     },
    "info"           : {
        "abtest": [{
            "smartRecs": [{
                "name" : "a/b test",
                "group": "A"
            }]
        }]
    }
}

Note: Each product can have different A/B groups. So, do not assume that a visitor in group A for Recommendations is also in group A for another Episerver product, such as, Promote.

Last updated: Nov 06, 2017

Feedback?