---
schema_version: "1"
id: 867fd802d6acda206ee3a8cbbf3aca0ea127740151d77eb0170382b3c37e7e17
title: A/B Testing for B2C Commerce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_ab_testing.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_ab_testing.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7d6d5525d3ce589bd1b1a9fc6ade27d8771f1e1f6ccdd3e1eb077528c592d43d
description: B2C Commerce A/B Testing gives you a tool to test different site experiences. Create and manage A/B tests, view test results, and change your site based on those results. Configure changes to your sites that affect only a subset of visitors to determine from collected data the experience that produces the best results.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# A/B Testing for B2C Commerce

B2C Commerce A/B Testing gives you a tool to test different site experiences. Create and manage A/B tests, view test results, and change your site based on those results. Configure changes to your sites that affect only a subset of visitors to determine from collected data the experience that produces the best results.

A/B tests offer these benefits.

- Data-driven decisions—B2C Commerce calculates a confidence level showing whether differences in results are due to the tested change and not random chance.
- Flexible testing scope—use content slot variations, sorting rules, promotions, against a control group to determine which version drives better results.
- Trackable metrics—select what to measure, such as revenue, conversion rate, or orders to align tests to specific business goals.
- Controlled rollout—divide shoppers into segments, including a control group. This division enables B2C Commerce to preserve the current experience as a baseline while you evaluate the changes in the results.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_important.png)

Important A/B tests take precedence relative to other promotions available in Salesforce B2C Commerce.

Create and manage tests through the A/B Tests module in Business Manager. To customize A/B tests using the B2C Commerce API, see [Custom A/B Testing for Developers in B2C Commerce](https://help.salesforce.com/s/articleView?id=cc.b2c_ab_testing_for_developers.htm&language=en_US).

## A/B Testing Versus Personalization

Although the effect is similar, A/B testing segments are different from personalization segments. Personalization of a site uses customer groups, so you define the criteria for the segments. A/B tests serve a different purpose than personalization. A/B test segments run at random, and collect metrics to help determine which experience performs the best according to one or more segment criteria. With both, the user sees an experience that is potentially different than other users.

## A/B Testing Eligibility

The Tracking site preference determines a shopper’s eligibility for A/B tests. The Tracking site preference is session-specific and only tracked shoppers are eligible for A/B tests. If your site doesn’t have the Tracking site preference turned on, your site's default Privacy setting determines eligibility.

To set this preference, click App Launcher ![App Launcher](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/cc/b2c_merchandiser_administrator/images/appLauncher.png), and then select **Merchant Tools** | **Site Preferences** | **Privacy**. If a shopper opts in or out of tracking mid-session, the A/B Test metrics show a slight inconsistency. A shopper's page can appear as though it's still tracking, but you can refresh the page to fix this issue.

The consistency of an A/B test experience varies slightly for eligible registered and unregistered shoppers.

- Eligible registered shoppers—the B2C Commerce database stores the mapping between the A/B test group assigned to the shopper's customer ID. B2C Commerce can recall the shopper's A/B test assignments, and so the shopping experience is consistent, regardless of which device the shopper uses.
- Eligible unregistered shoppers—B2C Commerce writes the shopper's assigned A/B test group to a cookie on the shopper's browser, so the test results are consistent only when the shopper is on the same device and is using the same browser. Also, the consent requirement, and varied A/B test experiences can impact your test sample size. Consider planning longer tests or altering your test criteria to capture significant A/B test data.

## Import or Export A/B Test Data

Use import and export features to move A/B test configurations between environments, for example, staging to production or to back up test setups. You can also use A/B test configurations for a site migration in a site import/export bundle.

Use export test configurations to back up or replicate an A/B test setup across sites or environments. By using configurations, you avoid recreating tests manually in Business Manager. Extract exported test results as a .csv file into a spreadsheet for further analysis. Use import configurations to update or delete data.

To modify specific attributes in bulk or programmatically, use UPDATE mode for an existing test, or remove a test by using DELETE mode. For more information, see [A/B Test Object Import and Export in B2C Commerce](https://help.salesforce.com/s/articleView?id=cc.b2c_ab_testing_object_import_export.htm&language=en_US).

## A/B Test Data Deletion

Shopper data deletion requests cascade to A/B test participant records. When a shopper requests to have their records deleted, the shopper's A/B test participant records are also deleted.

#### See Also

- [B2C Commerce: A/B Testing Strategy Guide](https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/B2C_Commerce_AB_Testing_Strategy_Guide.pdf)
- [Commerce Cloud Platform Adoption Playbook: A/B Testing](https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/Commerce_Cloud_AB_Testing_Platform_Adoption_Playbook.pdf)
- [Commerce Cloud Device-Type Detection Best Practices](https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/CommerceCloud_Device_TypeDetectionBestPractices.pdf)
- [Custom Scripting for Setting Up A/B Testing Outside of Business Manager](https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/B2CCommerceABTestingwithCustomScripting.pdf)

## Set Up Incremental Indexing

Set up incremental indexing for B2C Commerce.

1. Click App Launcher ![App Launcher](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/cc/b2c_merchandiser_administrator/images/appLauncher.png), and then select **Merchant Tools** | **Site** | **Search** | **Search Indexes**.
2. On the Search Indexes page, click the index type you want to configure.
3. Select the **Incremental Index Update** box for the index you want incrementally updated.
    
    This function isn't available for the search availability index, which B2C Commerce updates automatically and incrementally.
4. Click **Apply**.
5. Click **<< Back** to List to return to the Search Indexes page.

#### See Also

- [Rebuild Search Indexes (Video)](https://salesforce.vidyard.com/watch/WeAGCMnGAWyTkEqgXJpdWh)

## A/B Testing vs. Personalization

Although the effect is similar, A/B testing segmentation is different from personalization segmentation. The regular personalization of a B2C Commerce site, for example, done using customer groups, is segmented by criteria that you can define. Meanwhile, A/B test segmentation runs randomly. With both, the user sees an experience that is potentially different than other users. A/B testing, however, goes beyond personalization. A/B testing collects metrics to help determine which experience, among two or more, performs the best according to one or more segmentation criteria.

## A/B Testing Eligibility

The Tracking site preference determines a B2C Commerce shopper’s eligibility for A/B tests. The Tracking site preference is session-specific and only shoppers for whom tracking is allowed are eligible for A/B tests.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note If your site doesn’t have the Tracking site preference enabled, your site's default Privacy setting determines A/B test eligibility.

To set this preference, click App Launcher ![App Launcher](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/cc/b2c_merchandiser_administrator/images/appLauncher.png), and then select **Merchant Tools** | **Site Preferences** | **Privacy**.

If a shopper opts in or out of tracking mid session, the A/B Test Metrics show a slight inconsistency. Changing tracking mid session can also cause a shopper's page to appear as though it's still tracking. Refreshing the page fixes this issue.

The consistency of an A/B test experience varies slightly for eligible registered and unregistered shoppers.

- Eligible Registered–The mapping between the A/B test group assigned to the shopper's customer ID are stored in the database. As a result, the shopper's A/B test assignments are recalled, and therefore the shopping experience is consistent regardless of which device the shopper uses.
- Eligible Guest–The A/B test group that the shopper enters is written to a cookie on the shopper's browser. As a result, the shopper's A/B test assignments are recalled. The shopping experience is consistent only when the shopper is on the same device and using the same browser.

## Eligibility and A/B Test Sample Size

The consent requirement for A/B test eligibility and the possibility of a varied A/B test experience for unregistered B2C Commerce shoppers can impact your test sample size. Consider planning longer test durations or altering your test criteria to capture statistically significant A/B test date.

## A/B Test Data Deletion

B2C Commerce shopper data deletion requests cascade to A/B test participant records. When a shopper requests to have their records deleted from the system, all the shopper's A/B test participant records are deleted.