← All scenarios

Next.js — next/script "lazyOnload"

Next.js opt-in lazy-loading strategy. The script is deferred all the way to "browser idle" — meaning it waits not just for the page to finish loading, but for the browser to have nothing else to do. By that point, window.load has long since fired. This is the worst-case install pattern for V1 and is the closest analogue to what NitroPack does on gorayeb.com.

Each side runs the same scenario in its own iframe. The iframes load independently, so you can see how each pixel version behaves under identical conditions.

How to test:
  1. Load the page and wait ~5–10 seconds for the browser to idle.
  2. Confirm that wire.js downloads well after window.load.
  3. Check both pixel columns.
Expected: V1 — pretty much guaranteed to fail. window.load fired long before wire.js arrived, so V1’s listener attached too late. V2 — fires the moment wire.js executes, regardless of how late.
V1 · current pixel
Verdict
Initialising…
window.load
—
wire.js
—
pixel
—
Event timeline
  1. No events recorded yet…
Script tag for this scenario
<Script src="https://staging-api.wire.spbx.app/wire.js?account_id=79&property_id=6a2111320c2dee2dc5548935"
        strategy="lazyOnload" />
V2 · proposed fix
Verdict
Initialising…
window.load
—
wire.js
—
pixel
—
Event timeline
  1. No events recorded yet…
Script tag for this scenario
<Script src="https://staging-api.wire.spbx.app/wire.js?pixel_id=6a211df10c2dee2dc5548936&account_id=79&property_id=6a2111320c2dee2dc5548935"
        strategy="lazyOnload" />