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=1turns on verbose diagnostics for the page. Sticky: once set it persists across navigations until?opti_debug=0clears 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.
Debug and preview do different things to your data
| Flag | Variants | Tracking |
|---|---|---|
?opti_debug=1 | Serve normally | ON. The page tracks exactly as it would for a real visitor, which is what makes it useful for confirming an event fires. |
?opti_preview=1 | Apply, with a pinned arm | OFF. Every event is dropped before it leaves the browser, so QA traffic never pollutes your metrics or skews the bandit. |
| Both together | Apply, with a pinned arm | OFF. Preview wins, so you get the verbose panel and full suppression. |
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:
window.optimeleon('showHUD'); // force-open the overlay, even if it did not auto-render
window.optimeleon('hideHUD'); // dismiss it againshowHUDworks 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.
A quick install check
- Open your page with
?opti_debug=1. - Confirm the overlay says a campaign matched and a variant was assigned.
- Accept your cookie banner and confirm the consent state flips.
- 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.
