Api clients / JavaScript / V3 / Methods

Get A/B Test | JavaScript API Client V3 (Deprecated)

This version of the JavaScript API client has been deprecated in favor of the latest version of the JavaScript API client.

Required API Key: any key with the analytics ACL
Method signature
analytics.getABTest(integer abTestID, callback)

About this method

Get an A/B test information and results.

Examples

Get an A/B test

1
2
3
4
5
6
$analytics = AnalyticsClient::create(
  'YourApplicationID',
  'YourWriteAPIKey'
);

$analytics->getABTest(42);

Parameters

abTestID
type: integer
Required

The A/B test id that was sent back in the response of the add A/B test method

Response

In this section we document the JSON response returned by the API. Each language will encapsulate this response inside objects specific to the language and/or the implementation. So the actual type in your language might differ from what is documented.

JSON format

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  "abTestID": 78,
  "clickSignificance": 1,
  "conversionSignificance": 0.9937,
  "createdAt": "2018-05-15T17:52:15.644906Z",
  "endAt": "2018-05-17T23:59:59Z",
  "name": "Custom Ranking salesRank Test",
  "status": "stopped",
  "variants": [
    {
      "averageClickPosition": 0,
      "clickCount": 17115,
      "clickThroughRate": 0.19839107906664039,
      "conversionCount": 11508,
      "conversionRate": 0.13339670101658765,
      "description": "",
      "index": "atis-abtest-default",
      "noResultCount": 0,
      "searchCount": 86269,
      "trafficPercentage": 70,
      "userCount": 55501
    },
    {
      "averageClickPosition": 0,
      "clickCount": 7716,
      "clickThroughRate": 0.20869847452125934,
      "conversionCount": 5129,
      "conversionRate": 0.13872660391647734,
      "description": "",
      "index": "atis-abtest-salesRank",
      "noResultCount": 0,
      "searchCount": 36972,
      "trafficPercentage": 30,
      "userCount": 22694
    }
  ]
}
abTestID
integer

ID of the A/B test.

clickSignificance
float

A/B test significance based on click data. Should be > 0.95 to be considered significant (no matter which variant is winning).

conversionSignificance
float

A/B test significance based on conversion data. Should be > 0.95 to be considered significant (no matter which variant is winning)

createdAt
string

Time at which the A/B test has been created. The date will be in the following format: Y-m-d\TH:i:s\Z

endAt
string

Time at which the A/B test will automatically stop. The date will be in the following format: Y-m-d\TH:i:s\Z

name
string

Name of the A/B test.

status
string

Current status of the A/B test.

variants
list of variant

List of 2 variants:

  • The base index
  • The index to test against

variants ➔ variant

clickSignificance
float

A/B test significance based on click data. Should be > 0.95 to be considered significant (no matter which variant is winning).

conversionSignificance
float

A/B test significance based on conversion data. Should be > 0.95 to be considered significant (no matter which variant is winning)

averageClickPosition
int

Average click position for the variant.

clickCount
int

Distinct click count for the variant.

clickThroughRate
float

Click through rate for the variant.

conversionCount
int

Distinct conversion count for the variant.

conversionRate
float

Conversion rate for the variant.

Did you find this page helpful?