Skip to main content

A/B Experiments API

Integrating experiments through the SDK. Methods of operation.

List of Methods



Recommendations for Working with Experiments

  • Make changes to the game for side versions using the gp.experiments.has() check.
  • Always have a default version (A) to roll back to if needed.
  • In the default version (A), don't rely on the check, consider it the main version. Use overrides for other versions below or leave the A version as else.
  • Calibrate the version through an A/A test. Create an experiment and assign percentages to cohorts, but don't make any changes to the game. Make sure the metrics between these two versions are the same, then you can run the test. If there is a significant difference in metrics between the versions, reassign players to cohorts by clicking the "Reshuffle" button.

Example using check:

let difficulty = 'normal';

if (gp.experiments.has('EASY_LEVEL', 'easy')) {
difficulty = 'easy';
} else if (gp.experiments.has('EASY_LEVEL', 'extra_easy')) {
difficulty = 'extra_easy';


Example using cohort value:

const difficulty = || 'normal';


List of Experiments


You have access to the full list of experiments with their assigned cohorts upon launching the game and loading the player in key-value format.;

Example structure:

EASY_LEVEL: 'easy',
OFFER_ON_START: 'sale_50',
NO_RESTART: 'no_button_after_2nd_death',

Example usage:

const difficult = || 'default';


Check Experiment Cohort

gp.experiments.has(tag, cohort) FREE

// By Tag
const hasEasyLevel = gp.experiments.has('EASY_LEVEL', 'easy');

// Check
if (hasEasyLevel) {
// Cohort easy is active in the EASY_LEVEL experiment

Stay in Touch

Other documents of this chapter available Here. To get started, welcome to the Tutorials chapter.

GamePush Community Telegram: @gs_community.

For your suggestions e-mail: [email protected]

We Wish you Success!