Developer Reference4 min read

Preview Mode

Force a specific variant for QA and stakeholder review.

Preview Mode

Force a specific variant on a live test so you can QA each experience or share it with stakeholders — even visitors who wouldn't normally qualify will see exactly what you choose.

Preview mode is what you use to verify a test before launch and to share a variant link with reviewers. It overrides the SDK's normal assignment and targeting, so you can force any variant on any page the test targets — even on a fresh incognito session. Crucially, conversions fired during preview are flagged and excluded from your reports, so QA clicks don't pollute the data.

The two ways to enter preview mode (URL parameters and DevTools console) do the same thing under the hood. Pick whichever fits the workflow: URLs are great for sending to designers and PMs; the console is faster when you already have DevTools open.

# Append these query parameters to any page on your site
https://your-site.com/page?optimo-preview=TEST_ID&optimo-variant=VARIANT_NAME

# TEST_ID       - found in the URL of the test's detail page in Otter A/B
# VARIANT_NAME  - the variant's name (e.g. "Variant B") or its numeric ID

Good to know

  • Preview mode bypasses targeting rules and triggers, so the chosen variant renders on any page in the test, regardless of visitor eligibility.
  • Once set via URL, the preview is stored in sessionStorage, so you can navigate freely within the tab and keep seeing the same variant.
  • Add ?optimo-debug to enable verbose console logging — you'll see [Optimo] messages confirming which test and variant were applied.
  • A page reload is required after changing the values — the SDK reads them on init, not continuously.

Frequently asked questions

Quick answers to the questions teams ask most about this part of Otter A/B.