Skip to main content
Before you launch a test, see each test group yourself and confirm checkout applies it.

Preview a test group

Save your storefront’s address under Integrations > Headless Storefront, and once a test is in preview the ABConvert admin lists a link for each test group. Open or copy the one you want. Without a saved address, copy the test’s preview link and add abconvert_force to it: the test ID, a colon, and the test group’s position counting from 0, so Control is 0 and Variant A is 1. The test ID can be the number the admin shows or the abconvert_experiment_id value in the link:
To force every test at once, use the position alone: abconvert_force=1. The SDK reads the link’s query parameters and shows that test group, with nothing for you to build, and keeps showing it on the pages you open next for the rest of your visit. A forced test group skips the test’s targeting. Without abconvert_force, the link shows the test group your visit is placed in, and the test’s targeting applies to you. A test you just created previews at once: the link makes the SDK fetch a fresh copy of your tests when it does not have that test yet, so the first page can take up to 10 seconds. Two things differ from a theme:
  • The domain. Save your storefront’s address under Integrations > Headless Storefront, and preview links from the admin, the API and MCP open on your storefront. Until you do, they open on your online store: replace the domain and keep the query parameters.
  • No switcher. On a theme the preview link also opens a floating switcher between test groups. A custom storefront has none: open another test group’s link, or change the number after the colon.
To force a test group in code while you build, use the same methods on the server or in the browser:
On Next.js, a force on the server lasts only for that render. Use a preview link there instead. Forced and preview visits are left out of results. A preview link is never answered from a page your CDN stored: see Next.js caching and CDN.

Check the integration

Run this once after you integrate, with a price test in preview:
  1. Open the test’s preview link with abconvert_force=<test ID>:1 on your storefront, so Variant A shows. The product page shows the test price.
  2. Open a collection page and the cart. Both show the same test price.
  3. Go to checkout. The line shows the test price.
  4. Repeat with each button that reaches checkout without the cart page.
  5. Change the force to :0 for Control. Every page and checkout show the original price.
If checkout shows the original price in step 3 or 4, the cart is missing ABConvert’s attributes. See Connect the cart.