Spec: A/B Testing Events

This guide explains what data can be sent to Segment from A/B Testing tools. The semantic events detailed below represent the ideal for A/B Testing events.

Overview

Every A/B Testing tool is built around the concept of showing visitors an experiment with changes to the page. Each experiment can have multiple variations shown to different random samples of visitors.

Events

The one semantic event for recording A/B Test experiments is:

Experiment Viewed

This event will be sent automatically every time a customer sees a variation of an active A/B Test when using some A/B testing tools via Segment. You don’t actually have to make these track calls! Note that the A/B testing tools will need to be loaded synchronously in order for these events to fire properly.

Properties

This event supports the following semantic properties:

PropertyTypeDescription
experiment_idStringThe experiment’s ID.
experiment_nameStringThe experiment’s human-readable name.
variation_idStringThe variations’s ID.
variation_nameStringThe variation’s human-readable name.

Example


If you have any questions or see anywhere we can improve our documentation, please let us know or kick off a conversation in the Segment Community!