Skip to main content
Consent records and statistics

Create your first cookie banner A/B test

Test one change to an opt-in banner against your current version in an A/B test, also called a split test, and see whether it changes full acceptance.

Before you start: A/B testing is available when the selected domain itself is on the Business or Enterprise plan, and the domain needs a published opt-in banner.

1. Check that A/B testing is available

Select the domain, then open Analytics → A/B testing, below Statistics. Availability depends on the plan of the selected domain: another domain on Business or Enterprise does not unlock it. On other plans the item is locked and shows Available on Business and Enterprise; it does not open an upgrade page. To change a domain’s plan, see Upgrade or downgrade your plan.

2. Create the test

Select Create test and enter a name that describes the change, such as Clearer introductory text. If more than one published opt-in banner can be tested, choose the banner. A domain can have one draft or running test at a time.

The test has two versions. A - Current version is your published configuration. B - Test version starts as a copy of it, and B is the version you change.

3. Edit and preview version B

Edit B and preview both versions. A draft and its previews are not live and add nothing to your statistics. B must differ from A in at least one permitted way before you can start the test.

If the published banner changes after you created the draft, create a fresh draft so that A matches what visitors see. Discard draft deletes a test that has not started and frees the domain for a new one.

4. Know what version B can change

B stays within A’s banner type, template family and consent framework. You can change the supported design and text settings, such as wording, typography, spacing, colors, position or width. You cannot switch to another template, for example from a standard banner to IAB TCF. These stay the same in both versions:

  • The consent choices and what each button does.
  • Purposes, vendors and cookie categories.
  • Google Consent Mode, script blocking and how long consent is remembered.
  • Geographic routing and how the banner language is selected.
  • Required information and standardized TCF wording.

A test is never a reason to weaken accessibility or to make rejecting harder. Check both versions as described in Check your banner on mobile and with a keyboard.

5. Start the test

Select Start test. Each browser that takes part is assigned A or B at random in a fixed 50/50 split, and it keeps the same version for the rest of the test. Reloading the page does not reliably switch versions, and the assignment does not follow a person to another device or browser. A 50/50 split does not mean that both versions will record the same number of choices.

6. Know who takes part

Your normal regional routing runs first. Only visitors who would receive the tested opt-in configuration can take part; other banners and regions are not affected. Visitors who already have a valid consent choice are not asked again to get more participants, so the test collects observations as new choices are made.

7. Leave the test running

Once the test has started, both versions and the test’s scope are fixed. To change a setting that affects the test, such as routing or consent settings, end the test first. There is no scheduling, pause or resume, no third version, no adjustable split and no automatic winner.

To read and end the test, see Understand your banner A/B test results and End or troubleshoot a banner A/B test. For ideas, see Cookie banner A/B test ideas and examples.