/
Introduction
/
/
A/B Tests and Segmentation in Campaignswell

A/B Tests and Segmentation in Campaignswell

Campaignswell uses the cw_segment event for A/B testing and segmentation. It allows grouping users based on any conditions defined on the app side, and surfaces data in the Campaignswell UI under the AB Tests and Segments dimensions.

The event must be implemented and sent to the appropriate destination: to the MMP for mobile apps, and to the connected web analytics platform for web. This is required to enable reporting on Installs, Subscribers, Revenue, pRevenue, and other metrics segmented by A/B test and segment.

The event contains the following parameters:

Parameter Required Description Example
ab_test Yes, if A/B test AB Test name abtest1
segment Yes, if A/B test Segment name segmentA
cw_p1 – cw_p6 No Custom segmentation parameters, available in the UI customXYZ1

If a user belongs to multiple segments, send multiple events - one event per segment.

Web analytics implementation example:

trackEvent("cw_segment", {

    segment: "segmentA",

    ab_test: "abtest1",

    cw_p1: "customXYZ1",

    cw_p2: "customXYZ2"

});

This data can be used for segmentation and reporting in the Campaignswell UI.

For subscription-based tests (e.g., comparing different subscriptions or prices), sending cw_segment is not required - the algorithm automatically accounts for differences in price and subscription types. Data is available through standard dimensions.

⚠️ A user can appear in multiple segments if they trigger several cw_segment events matching different conditions. If you see multiple segments for a user, it means they triggered several different cw_segment events.

For platforms that handle experiment and onboarding data natively, the data is sent automatically via standard events — no additional implementation is needed. In this case, the AB test field corresponds to the experiment value, and the segment field corresponds to the onboarding value from the platform.

When adding AB test and segment data dimensions in Campaignswell, the data is structured in a specific way:

If a user has multiple AB test and/or segment values (i.e., the user was assigned to different segments of the same test, different tests, or different segments), that user will be assigned to each corresponding group.

If a user was first assigned to one AB test and/or segment and then to another, visits, revenue, and other user-based metrics will be attributed to all groups to which that user belongs.