Skip to main content

A/B Experiment Server SDK Overview

Last updated 10/20/2026

Overview​

The A/B Experiment Server SDK retrieves experiment parameters on your application server and uses them to apply different business strategies, helping you evaluate how different approaches affect business metrics.

You can configure the experiment's target audience, traffic allocation, and Feature values for each group. Your application server then uses the SDK to retrieve the corresponding configuration. Experiment exposure data and business event data are combined in the experiment report to evaluate each group's performance.

The Server SDK currently supports Java.

Use Cases​

Use the Server SDK when backend business logic controls the experiment treatment. For example:

Use CaseExample
Recommendation and ranking strategiesCompare the effects of different recommendation algorithms and content ranking rules
Game strategiesCompare different reward amounts, task difficulty levels, or resource configurations
Marketing and benefit strategiesCompare different promotional offers, benefit combinations, or engagement strategies
Server-controlled page contentReturn different content configurations from the server for the client to display

Workflow​

A server-side experiment consists of four stages: experiment configuration, parameter retrieval, business execution, and performance analysis.

  1. Configure the experiment. Create the Features you want to adjust and set their default values. Configure the experiment metrics, traffic layer, target audience, and parameter values for the control and experiment groups, then publish the experiment.
  2. Retrieve experiment parameters on the application server. Integrate the Java SDK and provide the allocation subject identifiers and related properties required by the experiment in your business requests to retrieve the corresponding Feature values.
  3. Execute business logic based on the parameters. The application server selects the corresponding strategy based on the returned values, such as using different recommendation rules or reward configurations.
  4. Record exposure and business events. Record experiment exposure at the point where the treatment actually takes effect, and report business events such as clicks, orders, and payments through your data collection pipeline.
  5. View the experiment report. Review exposure data and metric performance for each experiment group to evaluate the treatment's effects.

Retrieving experiment parameters, recording experiment exposure, and reporting business events serve different purposes. Parameter retrieval determines which business strategy to execute. Exposure records when the treatment actually takes effect. Business events are used to calculate experiment metrics. Verify each of these three steps separately during integration.

Prerequisites​

Prepare the following information before integrating the Java SDK:

ItemDescription
Project informationConfirm that the SDK connects to the same project as the experiment
Service URLsObtain the experiment configuration service URL and data reporting URL for your deployment environment, and confirm that your application server can access them
Feature configurationIdentify the Feature Keys, value types, and default values your application needs to read
Allocation subjectConfirm whether the experiment allocates traffic by user, account, device, or another subject, and prepare the corresponding identifiers
Request propertiesIf audience conditions are used, prepare the properties needed to evaluate them, ensuring that their names, types, and values match the configuration in the AE console
Data collectionConfirm that experiment exposure events and business metric events can be reported correctly and associated with the correct experiment subject

Keep allocation subject identifiers stable. For example, an experiment that allocates traffic by account should consistently use the same account identifier. Switching identifiers between requests can affect group assignment and statistics.

Your business code should also define a fallback so that it can continue executing the predefined business logic if configuration retrieval fails, a returned value is missing, or its type is unexpected.

For installation dependencies, initialization, parameter retrieval, and exposure APIs, refer to the Java SDK integration documentation for the version you use.

FAQ​

Do server-side experiments also require the client Experiment SDK?​

When experiment parameters are retrieved and applied by the application server, the client does not need to integrate the Experiment SDK again for that logic. If experiment metrics come from client-side behavior, the corresponding events must still be reported through the client Analytics SDK or another existing data pipeline.

Why is there no exposure data in the report after I retrieve experiment parameters?​

Successfully retrieving configuration does not mean that exposure data has been reported successfully. Check whether the treatment actually ran, whether exposure tracking was triggered at the correct point, and whether the data reporting pipeline and subject identifiers are correct.

Why is there no metric data even though the experiment has exposure data?​

Check whether the business events used by the metrics have been reported, whether the event names and properties match the metric definitions, and whether the business events can be correctly associated with the exposure subject. Also check the report's time range.

Do changes to experiment configuration in the AE console take effect immediately?​

When your application starts using a new configuration depends on the Java SDK's configuration retrieval and refresh mechanism. After publishing or updating an experiment, verify that the application server has retrieved and is using the updated configuration. For the exact refresh behavior, refer to the integration documentation for the SDK version you use.

Was this page helpful?