Below are a few example, ranging from simple to more complex, of how Experiments.js can be used to test Smart Cart, Widgets, and/or various settings to help drive more revenue.

Enable Smart Cart

First make sure you have enabled Smart Cart in the Rebuy admin. Adjust your settings to your liking and make sure that Smart Cart's Live Mode is disabled. This ensures no traffic will see Smart Cart.

In your optimization platform, such as Google Optimize, create your segment and then fire a single JavaScript function with the following contents:

RebuyExperiments.run('smart-cart')

Your experimental segment will now see Smart Cart!

Enable a Widget

First make sure you create your Widget in Rebuy admin. Adjust your settings to your liking and make sure that the Widget's Live Mode is disabled. This ensures no traffic will see the Widget. Make note of the Widget's ID (the number in the URL when editing widget settings).

In your optimization platform, such as Google Optimize, create your segment and then fire a single JavaScript function with the following contents:

RebuyExperiments.run('55555')

Your experimental segment will now see Widget (withid 55555).

Test Smart Cart's Switch to Subscription

First make sure you have enabled Smart Cart in the Rebuy admin. Adjust your settings to your liking and make sure that Smart Cart's Live Mode is enabled, and that the switch to subscription feature is disabled. This ensures no traffic will see the switch to subscription functionality.

In your optimization platform, such as Google Optimize, create your segment and then fire a single JavaScript function with the following contents:

RebuyExperiments.run({
  key: 'smart-cart',
  settings: {
    switch_to_subscription: {
        enabled: true
    }
  }
})

Your experimental segment will now see Smart Cart's switch to subscription functionality!

Test Smart Cart's Free Shipping Threshold

First make sure you have enabled Smart Cart in the Rebuy admin. Adjust your settings to your liking and make sure that Smart Cart's Live Mode is enabled, and that the free shipping feature is enabled with your default settings. This ensures all traffic will set Smart Cart, as well as the free shipping bar.

In your optimization platform, such as Google Optimize, create your segment and then fire a single JavaScript function with the following contents:

RebuyExperiments.run({
  key: "smart-cart",
  settings: {
    free_shipping: {
      enabled: true,
      minimum: 7500,
    }
  }
})

Your experimental segment will now see Smart Cart's free shipping bar with a $75 target instead of a $50 target (assuming you configured your settings for a $50 threshold)!

Change Widget Language & Discount

First make sure you create your Widget in Rebuy admin. Adjust your settings to your liking and make sure that the Widget's Live Mode is enable. This ensures your control group will see the widget with your default settings, which we will override with the experiment below. Make note of the Widget's ID (the number in the URL when editing widget settings).

In your optimization platform, such as Google Optimize, create your segment and then fire a single JavaScript function with the following contents:

RebuyExperiments.run({
  key: '55555',
  settings: {
    language: {
        title: "Limited-Time Offer, Save 20%"
    },
    discount: {
        type: "percentage",
      amount: 20
  }
})