API Reference / API Methods / A/B Test
List of methods

It’s recommended to use the Kotlin API client, which is better suited for Android development.

The region

A/B testing is specific to a region. As such, you should use the region where your analytics data is stored and processed. View your analytics region.

1
2
3
4
5
6
7
8
9
10
11
12
13
use Algolia\AlgoliaSearch\AnalyticsClient;

$analytics = AnalyticsClient::create(
    'YourApplicationID',
    'YourAdminAPIKey',
    'de' // Defaults to "us"
);

$abTest = [
    // The A/B test
];

$response = $analytics->addABTest($abTest);
Did you find this page helpful?