OptimeleonOptimeleon
Request Access
Measuring

Preview & debug

An on-page overlay that tells you exactly what Optimeleon did on the page you are looking at: which variant, why, and what it changed.

Optimeleon ships an on-site preview overlay: a small floating panel that narrates what the script did on the page you are looking at, including which campaign matched, which variant you were assigned, whether it applied, the consent state, and a live feed of the analytics events being sent.

It is a tool for you, not for your visitors. An ordinary visitor never sees it and never downloads a byte of it.

When it appears on its own

The overlay renders, and downloads its bundle, only when one of these is active:

  • ?opti_debug=1 turns on verbose diagnostics for the page. Sticky: once set it persists across navigations until ?opti_debug=0 clears it.
  • A “Preview on live site” link (or ?opti_preview=1) opens preview mode, where variants still apply but every analytics event is suppressed.

A visitor carrying neither flag downloads zero overlay bytes.

Preview is per-tab
A preview session, and the variant that link pins, is scoped to the browser tab you opened it in. Open the same URL in another tab, or after closing this one, and it is a normal visit. A preview can never leak into a real visitor's session.

Debug and preview do different things to your data

FlagVariantsTracking
?opti_debug=1Serve normallyON. The page tracks exactly as it would for a real visitor, which is what makes it useful for confirming an event fires.
?opti_preview=1Apply, with a pinned armOFF. Every event is dropped before it leaves the browser, so QA traffic never pollutes your metrics or skews the bandit.
Both togetherApply, with a pinned armOFF. Preview wins, so you get the verbose panel and full suppression.
Tip
Use debug when you are checking that tracking works. Use preview when you want to look at a variant without leaving a trace. A Preview link pins a specific arm and records nothing, so previewing is side-effect-free.

Summoning it on demand

To inspect a page that did not auto-render the overlay, for instance to see which variant a real visitor was assigned, call it from the browser console:

console
window.optimeleon('showHUD'); // force-open the overlay, even if it did not auto-render
window.optimeleon('hideHUD'); // dismiss it again
  • showHUD works on any page where the Optimeleon script is loaded. It renders the full backlog of this pageview's lifecycle rather than an empty shell, because the script records that lifecycle in memory on every page.
  • It routes through the same window.optimeleon(…) surface as the consent API. There is no separate global to call.
  • Opening or closing it fires no analytics events, so summoning it never affects your numbers.
The overlay is read-only
There is no in-overlay switcher for changing which variant is served. The panel narrates what the script did; it does not change it. To look at a different variant, open that variant's own Preview link.

A quick install check

  1. Open your page with ?opti_debug=1.
  2. Confirm the overlay says a campaign matched and a variant was assigned.
  3. Accept your cookie banner and confirm the consent state flips.
  4. Fire your conversion and watch it appear in the event feed.

If any of those four steps does not happen, the corresponding step of the setup checklist is the thing to go and fix.