This page documents an earlier version of the API client. For the latest version, see List all A/B tests.
analytics
Examples
Report incorrect code
Copy
AnalyticsClient analytics = new AnalyticsClient("YourApplicationID", "YourWriteAPIKey");
var abTests = analytics.GetABTests(10, 20);
// Asynchronous
var abTests = await analytics.GetABTestsAsync(10, 20);
Parameters
Prefix of index names. Returns A/B test variants whose index names start with this prefix.
Suffix of index names. Returns A/B test variants whose index names end with this suffix.
Number of A/B tests to retrieve.
Position of the first A/B test to retrieve.
Response
List of A/B test objects.
Show child attributes
Show child attributes
ID of the A/B test.
A/B test significance based on
addToCart
conversions.
Should be greater than 0.95 to be considered significant,
no matter which variant is winning.A/B test significance based on click data.
Should be greater than 0.95 to be considered significant,
no matter which variant is winning.
Configuration parameters for the A/B test.Example:
JSON
Report incorrect code
Copy
{
"outliers": {"exclude": true},
"emptySearch": {"exclude": true},
"minimumDetectableEffect": {}
}
Show child attributes
Show child attributes
Configuration effect of empty search exclusion from metrics calculations.
Show child attributes
Show child attributes
Whether empty searches are excluded when calculating A/B test results.
Configuration for minimum detectable effect.
Show child attributes
Show child attributes
The effect you want to detect. One of:
addToCartRate
clickThroughRate
conversionRate
purchaseRate
The smallest relative difference between the variants you want to detect.
For example, to detect a 10% difference between the variants, set this to 0.1.
The size must be between 0 and 1.
Configuration effect of outlier exclusion from metrics calculations.
A/B test significance based on conversion data.
Should be greater than 0.95 to be considered significant,
no matter which variant is winning.
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
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 of the A/B test.
A/B test significance based on
purchase
conversions.
Should be greater than 0.95 to be considered significant,
no matter which variant is winning.A/B test revenue significance for each currency.
The object has currency codes as keys and significance scores as values.
Current status of the A/B test.
List of 2 variants:
- The base index
- The index to test against
Show child attributes
Show child attributes
Distinct number of converted clicks with the
eventSubtype
set to addToCart
and clickAnalytics
set to true
.Add-to-cart rate is based on conversion events that have
eventSubType
set to addToCart
, and the total number of
tracked searches within the specified timeframe. The rates are computed as the number of add-to-cart conversion events divided by the
number of tracked searches.Average click position for the variant.
Distinct click count for the variant.
Click through rate for the variant.
Distinct conversion count for the variant.
Conversion rate for the variant.
Revenue metrics for each currency.Example:
JSON
Report incorrect code
Copy
{
"USD": {
"currency": "USD",
"revenue": "...",
"mean": "...",
"standardDeviation": "..."
},
"EUR": {}
}
Description of this variant.
Estimated number of searches needed to achieve confidence for this variant. This number is pre-computed and is based on the
minimumDetectableEffect
configuration parameter.Effects of the outlier or empty search exclusion.
Each effect has these properties:
usersCount
: number of users excluded by this filtertrackedSearchesCount
: number of tracked searches excluded by this filter
JSON
Report incorrect code
Copy
{
"outliers": {
"usersCount": "...",
"trackedSearchesCount": "..."
},
"emptySearch": {
"usersCount": "...",
"trackedSearchesCount": "..."
}
}
Index name for this variant.
Number of tracked searches without any results.
Distinct number of converted clicks with the
eventSubtype
set to purchase
and clickAnalytics
set to true
.Purchase rate is based on conversion events that have
eventSubType
set to purchase
, and the total number of
tracked searches within the specified timeframe. The rates are computed as the number of purchase conversion events divided by the
number of tracked searches.Total number of searches for this variant, including untracked searches.
Number of tracked searches.
Tracked searches are searches with
clickAnalytics
enabled.Number of users who searched this variant with at least one search that had
clickAnalytics
enabled.Total number of users who searched this variant, including untracked users.
Number of returned A/B tests.
Total number of A/B tests that can be fetched.
Response as JSON
This section shows the JSON response returned by the API. Each API client wraps this response in language-specific objects, so the structure may vary. To view the response, use thegetLogs
method.
Don’t rely on the order of properties—JSON objects don’t preserve key order.
JSON
Report incorrect code
Copy
{
"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",
"configuration": {
"outliers": {
"exclude": true
},
"emptySearch": {
"exclude": false
},
},
"variants": [
{
"averageClickPosition": null,
"clickCount": null,
"clickThroughRate": null,
"conversionCount": null,
"conversionRate": null,
"description": "my current scenario description",
"index": "scout_airports",
"noResultCount": null,
"searchCount": null,
"trackedSearchCount": null,
"trafficPercentage": 61,
"userCount": null,
"trackedUserCount": null,
"filterEffects": {
"outliers": {
"usersCount": 0,
"trackedSearchesCount": 0
}
}
},
{
"averageClickPosition": null,
"clickCount": null,
"clickThroughRate": null,
"conversionCount": null,
"conversionRate": null,
"description": "the test scenarios is based on locations",
"index": "airport_demo_airports",
"noResultCount": null,
"searchCount": null,
"trackedSearchCount": null,
"trafficPercentage": 39,
"userCount": null,
"trackedUserCount": null,
"filterEffects": {
"outliers": {
"usersCount": 1,
"trackedSearchesCount": 300
}
}
}
],
"clickSignificance": null,
"conversionSignificance": null
}
]
}