List A/B Tests
analytics
ACL
About this method
We released a new version of the PHP API client in public beta. Read the beta documentation for more information.
We released a new version of the JavaScript API client in public beta. Read the beta documentation for more information.
We released a new version of the Java API client in public beta. Read the beta documentation for more information.
You’re currently reading the JavaScript API client v4 documentation. Check the migration guide to learn how to upgrade from v3 to v4. You can still access the v3 documentation.
You’re currently reading the Ruby API client v2 documentation. Check the migration guide to learn how to upgrade from v1 to v2. You can still access the v1 documentation.
List A/B tests information and results.
Examples
Read the Algolia CLI documentation for more information.
List all A/B test
1
2
3
4
5
6
7
8
9
$analytics = AnalyticsClient::create(
'YourApplicationID',
'YourWriteAPIKey'
);
$analytics->getABTests([
'offset' => 10,
'limit' => 20
]);
Parameters
offset
|
type: integer
default: 0
Optional
Offset |
limit
|
type: integer
default: 10
Optional
Limit |
Response
This section shows the JSON response returned by the API. Since each language encapsulates this response inside objects specific to that language and/or implementation, the actual type in your language might differ from what’s written here. You can view the response in the logs (using the getLogs
method).
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
44
45
{
"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,
"trackedSearchCount": 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,
"trackedSearchCount": 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: |
endAt
|
string
Time at which the A/B test will automatically stop.
The date will be in the following format: |
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:
|
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. |