Api clients / JavaScript / V3 / Methods

List A/B Tests | 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.getABTests({
    offset => integer offset,
    limit => integer limit,
}, callback)

About this method# A

List A/B tests information and results.

Examples# A

List all A/B test#

Edit
1
2
3
4
5
6
7
8
9
$analytics = AnalyticsClient::create(
  'AJ0P3S7DWQ',
  '••••••••••••••••••••'
);

$analytics->getABTests([
  'offset' => 10,
  'limit' => 20
]);

Parameters# A

offset #
type: integer
default: 0
Optional

Offset

limit #
type: integer
default: 10
Optional

Limit

Response# A

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
38
39
40
41
42
43
{
  "count": 1,
  "total": 1,
  "abtests": [
    {
      "abtestID": 102,
      "name": "ABTest custom name",
      "createdAt": "2018-06-04T10:25:40.459519Z",
      "endAt": "2018-06-11T23:59:59Z",
      "status": "active",
      "variants": [
        {
          "index": "scout_airports",
          "trafficPercentage": 61,
          "description": "my current scenario description",
          "searchCount": null,
          "userCount": null,
          "noResultCount": null,
          "clickCount": null,
          "clickThroughRate": null,
          "averageClickPosition": null,
          "conversionCount": null,
          "conversionRate": null
        },
        {
          "index": "airport_demo_airports",
          "trafficPercentage": 39,
          "description": "the test scenarios is based on locations",
          "searchCount": null,
          "userCount": null,
          "noResultCount": null,
          "clickCount": null,
          "clickThroughRate": null,
          "averageClickPosition": null,
          "conversionCount": null,
          "conversionRate": null
        }
      ],
      "clickSignificance": null,
      "conversionSignificance": null
    }
  ]
}
count #
integer

Number of A/B tests returned.

total #
integer

Total number of A/B tests that can be fetched.

abtests #
List of abTest

abTest #

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?