Preview and QA debug mode
Force a variant with a link, inspect what the snippet is doing on a page, and switch it off for one page view.
Preview a variant#
Every variant has a preview link in the dashboard. It opens your real page with that variant applied, whatever the experiment's status — drafts and paused experiments included — so you can check a variant before any visitor sees it.
https://www.example.com/pricing?lift_preview=<experimentId>:<variantId>- Nothing is recorded
- In preview mode the snippet sends no events and stores nothing about you as a visitor. Your clicks and page views do not appear in any result.
- It follows you around the site
- The preview is remembered for the browser tab, so you can click through to other pages and the variant stays in force. Other tabs and other people are unaffected.
- Targeting is bypassed
- A forced variant is applied on whatever page you open. If its changes do not show there, its selectors do not match that page — which the debug panel will tell you.
- Anyone with the link can use it
- A preview link needs no login, which makes it easy to send to a client or a colleague for sign-off. It reveals only the variant's changes, and only to someone who has both ids.
To leave the preview, close the tab, use “exit preview” in the debug panel, or open any page with the parameter set to off:
https://www.example.com/pricing?lift_preview=offTo see how variants of different experiments look together, list several pairs separated by commas:
https://www.example.com/?lift_preview=<experimentId>:<variantId>,<experimentId>:<variantId>QA debug mode#
Add lift_debug=1 to any URL of your site to see what the snippet is doing there:
https://www.example.com/pricing?lift_debug=1A small panel appears in the corner of the page and the snippet starts logging to the browser console. Like a preview, debug mode sticks to the tab until you turn it off with lift_debug=0. It changes nothing about how you are assigned or measured: you are looking at a normal visit.
The panel shows:
- the mode of the page view (see the table below) and the version of the configuration that was loaded;
- each experiment that targets the page, the variant in effect, and whether it was assigned or forced;
- how many of the variant's changes are applied, how many are still waiting for their element to appear, and any that failed, with the reason;
- the most recent events the snippet queued: page views, exposures, conversions, custom events;
- a variant switcher per experiment. Choosing a variant starts a preview of it.
| Mode | Meaning |
|---|---|
| Live | Assigning, applying and tracking normally. |
| Preview | Showing forced variants. Nothing is stored or sent. |
| Editor | The visual editor is open: original page, no experiments, no tracking. |
| Blocked | The browser sent Do Not Track or Global Privacy Control, or consent was denied: original page, no storage, no events. |
| Waiting for consent | The site uses the opt_in consent mode and the page has not called lift.consent(true) yet. |
| Off | Switched off for this page view with lift_off=1, or no configuration could be loaded. |
https://www.example.com/pricing?lift_debug=0From the console#
The same information is available as data, which is handy in automated checks and when a page's layout hides the panel:
// A snapshot of the snippet's state (null until the config has loaded).
lift.debug();
// Also turn console logging on and open the QA panel.
lift.debug(true);{
"version": "0.1.0",
"mode": "live",
"siteKey": "lift_pk_YOUR_SITE_KEY",
"configVersion": 42,
"url": "https://www.example.com/pricing",
"visitorId": "k3J9…",
"sessionId": "s8Qz…",
"privacy": { "consentMode": "none", "blocked": false, "decision": null },
"experiments": 2,
"goals": 3,
"active": [
{
"experimentId": "0198c1de-…",
"experimentKey": "pricing-headline",
"variantId": "0198c1df-…",
"isControl": false,
"forced": false,
"status": { "total": 2, "applied": 2, "pending": 0, "failed": [] }
}
],
"events": [{ "t": "pv", "ts": 1767225600000 }]
}In status, pending counts changes whose selector matches nothing yet, and failed lists changes that could not be applied, each with a reason: unsafe (rejected by a safety check), invalid_selector, unsupported or error.
Switching the snippet off#
To see a page exactly as it would be without the snippet doing anything — for example to rule it out while chasing a bug on your site — add lift_off=1:
https://www.example.com/pricing?lift_off=1This applies to that one page view only and is not remembered. The global still exists, so calls your own code makes to lift.track() do not fail; they just do nothing.
A QA routine before starting#
- Open the preview link of each variant on desktop and on a phone. Check the changed elements and what surrounds them.
- With the debug panel open, confirm that every change is applied and none is pending or failed. Then navigate to another page and back.
- Exit the preview and trigger the primary goal yourself — click the button, submit the form. A conversion event should appear in the panel's event list once the experiment is running and you are assigned to it.
- If the site uses a consent banner, repeat once after declining: the page should be the original and the panel should report that nothing is tracked.
Your own visits count
lift_off=1 or in preview mode.Still stuck? The reasons a page shows the original are listed in When something goes wrong.