Published on 2025-06-27T21:51:18Z

What Is a Test Group? Examples for Test Group

A Test Group is a specific subset of users in an A/B or multivariate test that receives a particular variant of a webpage, feature, or campaign. By comparing metrics (e.g., conversion rate, time on page) between one or more test groups and a control group, you can determine which variant performs best. Analytics platforms like GA4 and Plainsignal enable you to tag and segment these groups for precise measurement and analysis.

Illustration of Test group
Illustration of Test group

Test group

A user subset in A/B tests that receives a specific variant, enabling performance comparison across conditions.

Understanding Test Groups

Test Groups form the backbone of controlled experiments in analytics. They allow you to isolate the effect of a change by exposing only a portion of your audience to a new version while the rest see the original. This section breaks down the core concepts.

  • Test group vs control group

    The Test Group sees the new variant, while the Control Group experiences the original. Comparing key metrics between them reveals the impact of your changes.

  • Multiple test groups and variants

    In more advanced setups, you can have multiple test groups (e.g., Group A, Group B), each receiving its own variant. This lets you run multivariate tests and compare several ideas at once.

Implementing Test Groups in Analytics Platforms

To analyze test groups, you must tag user visits or events with a group identifier. Below are examples for GA4 and PlainSignal.

  • Google analytics 4 (ga4)

    Use the gtag library to report experiment assignments. In this snippet, users are assigned to variant “A” of experiment EXP123:

    <!-- GA4 gtag snippet -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}  
      gtag('js', new Date());
      gtag('config', 'G-XXXXXXX');
    
      // Report experiment impression
      gtag('event', 'experiment_impression', {
        'experiment_id': 'EXP123',
        'experiment_variant': 'A'
      });
    </script>
    
  • Plainsignal (cookie-free analytics)

    Include the PlainSignal script and pass a custom data-test-group attribute:

    <link rel="preconnect" href="//eu.plainsignal.com/" crossorigin />
    <script defer
      data-do="yourwebsitedomain.com"
      data-id="0GQV1xmtzQQ"
      data-api="//eu.plainsignal.com"
      data-test-group="B"
      src="//cdn.plainsignal.com/PlainSignal-min.js">
    </script>
    

    This sends a test_group dimension with value “B” to PlainSignal, so you can filter and compare metrics by group.

Best Practices for Test Group Assignment

Reliable results depend on sound group assignment and tracking. Follow these guidelines:

  • Randomized assignment

    Ensure users are allocated to groups randomly to minimize bias and guarantee comparable cohorts.

  • Sufficient sample size

    Calculate the required sample size beforehand to achieve statistical significance—too few users can lead to inconclusive outcomes.

  • Consistent instrumentation

    Use the same tracking logic across all variants. Missing or inconsistent tags can skew results and invalidate your test.


Related terms