Skip to content

Basic Concepts

Understanding these concepts will help you configure experiments, events, and integrations correctly.

A project represents a single website or application. Each project has:

  • A public key (projectKey) used by the pixel
  • URL rules and experiments scoped to that project
  • Goals, webhooks, and integration settings

Projects belong to a tenant (your company account).

Ttoolab uses a single production environment per project for published experiments. Draft experiments exist only in the dashboard until you publish them.

An experiment is a structured test with a hypothesis, variants, URL rules, and goals. Experiment types include:

| Type | Purpose | | :--- | :------ | | ab | Change page elements in the browser | | split_url | Send visitors to different URLs | | redirect | Redirect visitors to a target URL | | feature_flag | Toggle features on or off per visitor |

Experiments have a lifecycle: draftrunningpaused / completed.

A variant is one version of an experiment. Each variant has a key (e.g. control, variant-b), a traffic weight, and optional changes (for A/B tests) or redirect URLs (for redirect/split URL tests).

The SDK assigns each visitor to exactly one variant per experiment using weighted random assignment. Sticky assignment keeps the same variant across sessions.

A visitor is identified by an anonymous ID generated by the pixel and stored in the browser’s localStorage. Ttoolab does not require login to run experiments.

The anonymous ID persists across sessions on the same browser unless cleared with ttoolab.clear().

An exposure records that a visitor was assigned to a variant and saw the experiment. The SDK sends an automatic $exposure event when active assignments exist.

Exposures are the denominator for conversion rate calculations.

A goal defines what success looks like for an experiment. Goal types include:

  • page_view — visitor reaches a URL
  • click — visitor clicks an element
  • custom_event — visitor triggers a named event
  • revenue — event includes a revenue value
  • form_submit — visitor submits a form

Goals link experiment results to business outcomes.

An event is a named action sent from your site. The SDK method ttoolab.track() sends custom events. Events can trigger goals and appear in experiment reports.

Built-in events include $exposure (automatic) and survey events for CES surveys.

Segmentation (targeting) controls which visitors enter an experiment. Options include URL patterns, traffic allocation percentage, device, country, browser, UTM parameters, and referrer rules.

Visitors who do not match targeting rules are not assigned to the experiment.

A feature flag is an experiment of type feature_flag. Use ttoolab.getVariant("flag-key") in your code to read the assigned variant and enable or disable features.

Feature flags share the same assignment and exposure mechanics as A/B tests but are intended for controlled rollouts rather than hypothesis testing.

A webhook is an HTTP callback that Ttoolab sends to your server when something happens — for example, an experiment is published, a conversion occurs, or a CES survey response is submitted.

Webhooks are configured per project in the Ttoolab dashboard.