API Reference / API Methods / A/B Test / List A/B tests
Feb. 26, 2019

List A/B tests

Required API Key: any key with the analytics ACL
Method signature
$analytics->getABTests()
$analytics->getABTests([
  // All the following parameters are optional
  'offset' => integer,
  'limit' => integer,
])

About this method

List A/B tests information and results.

Examples

List all A/B test

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

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

Parameters

offset
type: integer
default: 0
Optional

Offset

limit
type: integer
default: 10
Optional

Limit

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
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

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

conversionSignificance
float

ABTest 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

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

conversionSignificance
float

ABTest 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?