flaskExperimentation

Mtrix's experimentation feature allows you to run A/B tests and feature experiments with minimal development effort. This section covers how to implement, manage, and analyze experiments in your application.

Basic Concepts

Before diving into implementation, it's important to understand a few key concepts:

  • Experiment: A test comparing multiple variants of a page or component

  • Arm: Component that holds the variants (used in multi-variate testing)

  • Variant: A specific version of a component (original/control or modified)

  • Audience: Users targeted for inclusion in the experiment

  • Conversion: A user action that indicates success for the experiment (fires with Purchase event)

Implementing Experiments

Fetch Experiment Data

To apply experiments on a page, first retrieve the experiment data:

Sample Response Format

When calling mtrix.getPageDetails(), you'll receive a response like this:

Advanced Experimentation

Using Audiences

If you're using Mtrix as your primary infrastructure or client-side version of the Mtrix library, audience details will be fetched automatically. However, if you're using npm package, you need to provide the audience details and the value for each condition while making the getPageDetails call:

Last updated