Skip to content
  • There are no suggestions because the search field is empty.

How to A/B Test Rebuy Smart Cart Against Shopify’s Native Cart

If you want to A/B test Rebuy Smart Cart against Shopify's native cart, the recommended setup depends on how Rebuy is integrated into the Shopify theme.

Determine the Rebuy Integration Type

Before setting up the test, confirm whether Rebuy Smart Cart can be integrated using a JavaScript snippet or whether it requires deeper theme integration.

Option 1: JavaScript-Based Integration

If Rebuy can be added using a JavaScript snippet, you can add the required Rebuy code to the site and use JavaScript logic to control when Smart Cart is displayed.

In this setup, a Theme Test is not necessarily required.

Rebuy also provides its own guidance for split-testing Smart Cart against Shopify's native cart using conditional JavaScript.

Option 2: Deep Theme Integration

If Rebuy requires deeper integration with the Shopify theme, there are two possible approaches.

A. Run a Theme Test

You can use a theme test to separate the two cart experiences.

For example:

Theme Cart
Control theme Your native cart
Variation theme Rebuy Smart Cart

This approach allows each version of the site to have its corresponding cart configuration.

B. Add Both Carts and Use a CSS/JavaScript Toggle

Another option is to ask Rebuy whether they can provide CSS or JavaScript that allows Smart Cart and Shopify's native cart to coexist in the theme while controlling which cart is displayed.

With this setup, both cart implementations can be added to the theme, while the CSS/JavaScript determines which version is active for each visitor.

If both cart implementations are present on the same theme, carefully test the interaction between them before launching the test.

In particular, verify that:

  • Add-to-Cart functionality works as expected.
  • The correct cart opens after adding a product.
  • The native cart does not appear when Smart Cart is intended to be shown.
  • Smart Cart does not appear when the native cart is intended to be shown.
  • Cart contents and quantities remain accurate.

Having both cart implementations active can potentially cause conflicts, so thorough QA is recommended before launching the test.

Which Approach Should I Use?

Rebuy integration Recommended approach
JavaScript-based integration Use the JS-based approach to control Smart Cart
Deep theme integration Run a theme test, or ask Rebuy for a CSS/JS toggle
Both carts added to the same theme QA carefully for cart and Add-to-Cart conflicts

A Theme Test is not always required when testing Rebuy Smart Cart against Shopify's native cart.

If Rebuy can be integrated using JavaScript, a JS-based approach can be used. If Rebuy requires deeper theme integration, a theme test is one recommended approach. Alternatively, Rebuy may be able to provide CSS/JavaScript that allows both cart implementations to be added to the same theme and toggled between them.

Before launching the test, confirm the integration requirements with Rebuy and thoroughly QA the cart and Add-to-Cart behavior.


For further assistance or questions, reach out on the chat support widget or via support@visually.io.